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

CREATE STREAM should support column names starting with @ when reading from JSON #572

Closed
my2ndhead opened this issue Dec 22, 2017 · 1 comment · Fixed by #581
Closed

Comments

@my2ndhead
Copy link

Some json documents may contain elements starting with a @-character.

Example query:

CREATE STREAM filebeat_original (@timestamp VARCHAR, message VARCHAR) with (kafka_topic='filebeat', value_format='JSON');

Example json:

{ "@timestamp": "2017-12-19T15:37:55.184Z", "@metadata": { "beat": "filebeat", "type": "doc", "version": "6.1.0", "topic": "filebeat" }, "offset": 14619691, "message": "Dec 19 16:37:54 www kernel: ...snip...", "source": "/var/log/messages", "prospector": { "type": "log" }, "beat": { "name": "www", "hostname": "www", "version": "6.1.0" } }

ksql should support the @ character in column names, allow substitution characters or renaming columns on-the-fly.

@hjafarpour
Copy link
Contributor

@my2ndhead I pushed a fix for handling fields with @ prefix. Please try the latest version from master branch and let us know if you find any issues.

@apurvam apurvam closed this as completed Feb 13, 2018
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

Successfully merging a pull request may close this issue.

3 participants