confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
118 stars 1.04k forks source link

Cannot Join on STRING (VARCHAR) Column #1132

Closed tomlinsonr closed 6 years ago

tomlinsonr commented 6 years ago

This query returns NULLS even though the data joined on is the same in both tables:

SELECT TA_1.CITY as CITY FROM ALL.USER_CLICKSTREAM TA_0 LEFT OUTER JOIN clickstream_users.WEB_USERS TA_1 ON ( TA_0.CITY=TA_1.CITY );

Also tested:

SELECT TA_1.USERNAME as USERNAME FROM ALL.USER_CLICKSTREAM TA_0 LEFT OUTER JOIN clickstream_users.WEB_USERS TA_1 ON ( TA_0.USERNAME=TA_1.USERNAME );

hjafarpour commented 6 years ago

@tomlinsonr You need to have stream/table name without any prefix in the query. Try this: SELECT TA_1.CITY as CITY FROM USER_CLICKSTREAM TA_0 LEFT OUTER JOIN WEB_USERS TA_1 ON ( TA_0.CITY=TA_1.CITY );

tomlinsonr commented 6 years ago

I 100% should have tested that!!! Thanks. My bad. Works fine.