You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Pinjie Huang <pi...@afterpay.com.INVALID> on 2021/11/29 02:43:57 UTC

Time attribute will be lost after two(or more) table joining

Hi Friends,However, we found that the time attribute will be lost after
table joining, which means that we cannot do the joining and aggregation at
one SQL query statement. There will be no output after the above SQL
querying, for SQL queries on streaming tables, the time_attr argument of
the group window function
<https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/sql/queries.html#group-windows>
must refer to a valid time attribute that specifies the processing time or
event time of rows. In wide_table,  the time_attr of field
eventInfo_eventTime has been lost.

Any ideas?

Re: Time attribute will be lost after two(or more) table joining

Posted by Caizhi Weng <ts...@gmail.com>.
Hi!

As this mail is written in English I'm also forwarding this to the user
mailing list.

Streaming joins do not retain row time attribute and this is the expected
behavior. As you're windowing the results of joins I guess you're enriching
the records from one stream with that join. Lookup joins [1] and event time
temporal join [2] will retain row time and their results can be used by
windowing operators later. Do they meet your needs?

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/joins/#lookup-join
[2]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/joins/#event-time-temporal-join

Pinjie Huang <pi...@afterpay.com.invalid> 于2021年11月29日周一 上午10:44写道:

> Hi Friends,However, we found that the time attribute will be lost after
> table joining, which means that we cannot do the joining and aggregation at
> one SQL query statement. There will be no output after the above SQL
> querying, for SQL queries on streaming tables, the time_attr argument of
> the group window function
> <
> https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/sql/queries.html#group-windows
> >
> must refer to a valid time attribute that specifies the processing time or
> event time of rows. In wide_table,  the time_attr of field
> eventInfo_eventTime has been lost.
>
> Any ideas?
>

Re: Time attribute will be lost after two(or more) table joining

Posted by Caizhi Weng <ts...@gmail.com>.
Hi!

As this mail is written in English I'm also forwarding this to the user
mailing list.

Streaming joins do not retain row time attribute and this is the expected
behavior. As you're windowing the results of joins I guess you're enriching
the records from one stream with that join. Lookup joins [1] and event time
temporal join [2] will retain row time and their results can be used by
windowing operators later. Do they meet your needs?

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/joins/#lookup-join
[2]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/joins/#event-time-temporal-join

Pinjie Huang <pi...@afterpay.com.invalid> 于2021年11月29日周一 上午10:44写道:

> Hi Friends,However, we found that the time attribute will be lost after
> table joining, which means that we cannot do the joining and aggregation at
> one SQL query statement. There will be no output after the above SQL
> querying, for SQL queries on streaming tables, the time_attr argument of
> the group window function
> <
> https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/sql/queries.html#group-windows
> >
> must refer to a valid time attribute that specifies the processing time or
> event time of rows. In wide_table,  the time_attr of field
> eventInfo_eventTime has been lost.
>
> Any ideas?
>