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 #15

Open
WladOd opened this issue Mar 4, 2021 · 1 comment
Open

Create stream #15

WladOd opened this issue Mar 4, 2021 · 1 comment

Comments

@WladOd
Copy link

WladOd commented Mar 4, 2021

Hello,
It is not the issue actually but I wonder about REST API response in case of duplicated streams.
CREATE STREAM IF NOT EXISTS users (user_id BIGINT KEY,active BOOLEAN, email VARCHAR,email_confirmed BOOLEAN, first_name VARCHAR,last_name VARCHAR,role VARCHAR,password VARCHAR,created_at VARCHAR,updated_at VARCHAR) WITH (kafka_topic='users', value_format='json', partitions=1);
gives
{"@type":"statement_error","error_code":40001,"message":"Cannot add stream 'USERS': A stream with the same name already exists","statementText":"CREATE STREAM IF NOT EXISTS USERS (USER_ID BIGINT KEY, ACTIVE BOOLEAN, EMAIL STRING, EMAIL_CONFIRMED BOOLEAN, FIRST_NAME STRING, LAST_NAME STRING, ROLE STRING, PASSWORD STRING, CREATED_AT STRING, UPDATED_AT STRING) WITH (KAFKA_TOPIC='users', KEY_FORMAT='KAFKA', PARTITIONS=1, VALUE_FORMAT='JSON');","entities":[]}
but the documentation says
If the IF NOT EXISTS clause is present, the statement won't fail if a stream with the same name already exists.
Statement is not failing but request does. Seems very confusing.

@thmeitz
Copy link

thmeitz commented Nov 1, 2021

Hi @WladOd,
you are right. I've tested it today and it fails.

There is an open issue.

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

2 participants