-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Understanding the error message outputted by ksql #6303
Comments
Hello @eshil-patel when we examine this query: CREATE STREAM joinStream
AS SELECT
stream1.payload->sf1->sf2->sf3->nestedField3
FROM stream1 LEFT JOIN stream2
WITHIN 10 seconds ON
stream1.payload->sf1->sf2->sf3->nestedField3 =
stream2.payload->sf1->sf2->sf3->nestedField3
GROUP BY stream1.payload->sf1->sf2->sf3->nestedField3
HAVING COUNT(stream1.payload->sf1->sf2->sf3->nestedField3) = 1; The key for the output is AS SELECT
stream1.payload->sf1->sf2->sf3->nestedField3,
AS_VALUE(stream1.payload->sf1->sf2->sf3->nestedField3) AS nestedField3InValue This is different behavior from standard SQL, which doesn't differentiate between key and value columns. If you want the full details, I recommend you skim this blog: https://www.confluent.io/blog/ksqldb-0-10-updates-key-columns/ (specifically the section on aggregations - https://www.confluent.io/blog/ksqldb-0-10-updates-key-columns/#maintaining-compatibility-aggregations). |
Hi @agavra , I've tried these two queries following your recommendation
This got me this error:
When I added it to the groupBy, this is the message I got:
Im assuming when I add it into the group by, it does what happened originally, and has only one key column. Any ideas whats happening in the first situation ? |
@agavra Thanks for that explanation and insight, that answers my question about the query. |
Provide details of the setup you're running
I am running ksqldb version 0.11.0. The Kafka broker version underneath is 2.4.1 (from AWS MSK).
Outline your question
I am trying to perform a join between two streams. Our data format in the Kafka topic is nested json, with no key. Here are the steps that I take:
Im able to execute steps 1 and 2 with no issue, but i get an error on step 3 :
If i remove the groupBy and Having statements, as well as add in the rowkey column , I have this request:
which is successful.
Any ideas on what I could be doing wrong here or what is the issue?
The text was updated successfully, but these errors were encountered: