Αναρτήσεις

Προβολή αναρτήσεων από Νοέμβριος, 2022

Calendar table on Vertica DB

Εικόνα
Calendar Table In this post we will describe how can we create a calendar table on Vertica db using Timeseries analytics. TIMESERIES Clause Provides gap-filling and interpolation (GFI) computation, an important component of time series analytics computation. More information you can find on  timeseries info . Our query consists of 3 parts in order to have all the necessary fields. CREATE TABLE IF NOT EXISTS calendar AS 👉    SELECT ROW_NUMBER() over(partition by 1) AS id   , tmp.* FROM ( 👉     SELECT  slice_time                                                   AS  actual_timestamp,                      CAST(slice_time AS DATE)                      ...