Re: Best way to handle BIGING to TIMESTAMP conversions

2021-03-02 Thread Yik San Chan
I think you can also do CAST((e / 1000) AS TIMESTAMP) On Tue, Mar 2, 2021 at 7:27 PM Sebastián Magrí wrote: > Thanks a lot Jark, > > On Mon, 1 Mar 2021 at 02:38, Jark Wu wrote: > >> Hi Sebastián, >> >> You can use `TO_TIMESTAMP(FROM_UNIXTIME(e))` to get a timestamp value. >> The BIGINT should b

Re: Best way to handle BIGING to TIMESTAMP conversions

2021-03-02 Thread Sebastián Magrí
Thanks a lot Jark, On Mon, 1 Mar 2021 at 02:38, Jark Wu wrote: > Hi Sebastián, > > You can use `TO_TIMESTAMP(FROM_UNIXTIME(e))` to get a timestamp value. > The BIGINT should be in seconds. Please note to declare the computed > column > in DDL schema and declare a watermark strategy on this com

Re: Best way to handle BIGING to TIMESTAMP conversions

2021-02-28 Thread Jark Wu
Hi Sebastián, You can use `TO_TIMESTAMP(FROM_UNIXTIME(e))` to get a timestamp value. The BIGINT should be in seconds. Please note to declare the computed column in DDL schema and declare a watermark strategy on this computed field to make the field to be a rowtime attribute. Because streaming o

Best way to handle BIGING to TIMESTAMP conversions

2021-02-20 Thread Sebastián Magrí
I have a table with two BIGINT fields for start and end of an event as UNIX time in milliseconds. I want to be able to have a resulting column with the delta in milliseconds and group by that difference. Also, I want to be able to have aggregations with window functions based upon the `end` field.