Skip to content
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

Extract all columns from a topic #1310

Closed
lauraquah opened this issue May 16, 2018 · 2 comments
Closed

Extract all columns from a topic #1310

lauraquah opened this issue May 16, 2018 · 2 comments

Comments

@lauraquah
Copy link

I'm trying to extract all the columns from a topic into a stream, is there a way to do so or do I have to list them out:

CREATE STREAM mystream(id BIGINT, projectName VARCHAR, buildDuration BIGINT,......) WITH (kafka_topic='rawdata', value_format='JSON');

Is there a function like * to create stream with all of the columns from the topic?

@hjafarpour
Copy link
Contributor

If your data is in Avro format you can do this with skipping the column definition, here is an example: https://www.confluent.io/blog/ksql-december-release
KSQL will get the column info from the schema registry.
For JSON you need to define the columns in CREATE STREAM/TABLE statement.

@agavra
Copy link
Contributor

agavra commented Oct 16, 2019

Closing out this ticket as part of cleaning our backlog. Hojjat's answer is the most up to date - JSON support for schema registry will be coming hopefully in the near future, at which point you will not need to specify the schema in KSQL! You can follow that feature request here: confluentinc/schema-registry#220

@agavra agavra closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants