ListFromRangeForDates.yqls 965 B

123456789101112131415
  1. (
  2. (let config (DataSource 'config))
  3. (let res_sink (DataSink 'result))
  4. (let intervalOneSec (Interval '"1000000"))
  5. (let FirstList (ListFromRange (SafeCast (CurrentUtcDate) (DataType 'Datetime)) (Unwrap (- (CurrentUtcDatetime) (Interval '"63995000000"))) intervalOneSec))
  6. (let SecondList (ListFromRange (CurrentUtcDate) (Unwrap (+ (CurrentUtcDate) (Interval '"432000000000"))) (Interval '"86400000000")))
  7. (let ThirdList (ListFromRange (CurrentUtcDatetime) (Unwrap (+ (CurrentUtcDatetime) (Interval '"5000000"))) intervalOneSec))
  8. (let FourthList (ListFromRange (CurrentUtcTimestamp) (Unwrap (+ (CurrentUtcTimestamp) (Interval '"5"))) (Interval '"1")))
  9. (let Columns '('"column0" '"column1" '"column2" '"column3"))
  10. (let Col '('('type) '('autoref) '('columns Columns)))
  11. (let world (Write! world res_sink (Key) (AsList (AsStruct '('"column0" FirstList) '('"column1" SecondList) '('"column2" ThirdList) '('"column3" FourthList))) Col))
  12. (return (Commit! world res_sink))
  13. )