YAML -> SQL

YAML

    

main:
  select:
  - operator: date_trunc
    args:
    - value: hour
    - field: date_range
  from:
    operator: generate_series
    args:
    - value: 2015-02-03
    - value: 2019-02-10
    - value: 1 hour
    alias: date_range
    

SQL

    
SELECT DATE_TRUNC('hour', date_range) FROM GENERATE_SERIES(CAST('2015-02-03' AS timestamp), CAST('2019-02-10' AS timestamp), '1 hour') AS date_range