Coder Social home page Coder Social logo

Comments (8)

FrankR85 avatar FrankR85 commented on May 18, 2024 6

Your tutorials still show the old syntax

from ksql.

arruw avatar arruw commented on May 18, 2024 3

I'm having the same issue on version 6.0.0

sh-4.4$ ksql
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

                  ===========================================
                  =       _              _ ____  ____       =
                  =      | | _____  __ _| |  _ \| __ )      =
                  =      | |/ / __|/ _` | | | | |  _ \      =
                  =      |   <\__ \ (_| | | |_| | |_) |     =
                  =      |_|\_\___/\__, |_|____/|____/      =
                  =                   |_|                   =
                  =  Event Streaming Database purpose-built =
                  =        for stream processing apps       =
                  ===========================================

Copyright 2017-2020 Confluent Inc.

CLI v6.0.0, Server v6.0.0 located at http://localhost:8088

Having trouble? Type 'help' (case-insensitive) for a rundown of how things work!

ksql> CREATE TABLE itemsTable WITH(KAFKA_TOPIC='coreCmdItemV2', VALUE_FORMAT='avro', KEY='ID');
Failed to prepare statement: Invalid config variable(s) in the WITH clause: KEY
ksql>

from ksql.

agavra avatar agavra commented on May 18, 2024 3

hello @matjazmav - we removed the WITH(key= syntax in 6.0. You can read more about it here: https://www.confluent.io/blog/ksqldb-0-10-updates-key-columns/

the tl;dr is that you should specify the key in your create statement: CREATE TABLE itemsTable (ID INT PRIMARY KEY) WITH(...);

from ksql.

zhuxt2015 avatar zhuxt2015 commented on May 18, 2024

then I meet another issue ,when I replaced KEY with PARTITION_BY and execute the create stream statement again,

ksql> CREATE STREAM test_timestamp2  WITH (kafka_topic='test_time',partition_by='genTime',partitions=3,replications=3,timestamp='genTime') as select flag,id,username,money,stringtotimestamp(create_time,'yyyy-MM-dd HH:mm:ss') as genTime, random from test1;
io.confluent.ksql.util.KsqlException: Cannot add the new topic. Another topic with the same name already exists: test_time
ksql> show topics;

 Kafka Topic    | Registered | Partitions | Partition Replicas 
---------------------------------------------------------------
 ksql__commands | true       | 1          | 1                  
 live           | true       | 3          | 3                  
 test           | false      | 1          | 1                  
 test_time      | true       | 3          | 3                  
 TEST_TIMESTAMP | false      | 3          | 3
ksql> list streams;

 Stream Name    | Kafka Topic | Format    
------------------------------------------
 TEST_TIMESTAMP | test_time   | DELIMITED 
 TEST1          | live        | DELIMITED 

The topic test_time already created even though the statement failure.

from ksql.

hjafarpour avatar hjafarpour commented on May 18, 2024

@zhuxt2015 Thanks for your feedback. The docs issue has been resolved. The first statement you ran created the result topic. You need to delete this topic in Kakfka or use a different topic name for the result stream.
Let us know if you find any other issues.

from ksql.

sgulati89 avatar sgulati89 commented on May 18, 2024

Hi Team,

Is it still not fixed? I am using 5.0 version of confluent and I am still getting error " Invalid config variable in the WITH clause: KEY"

from ksql.

gpinu1 avatar gpinu1 commented on May 18, 2024

Is this fixed in confluent version 5.2.1?

I am getting the same error with the confluent 5.2.1

from ksql.

agavra avatar agavra commented on May 18, 2024

@FrankR85 - you linked to the 5.4 versions of the docs, please try the newest versions which link to the microsite (https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/create-table-as-select/)

from ksql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.