The issue to access to Kstream
samyujialiu opened this issue · comments
Hi there, we meet a problem about accessing to the Ksql. We use docker compose to launch the kafka. So there is no username and password. Does it affect? Or how to solve the question? Thanks
Try to use the fat jar, in any case username and password have nothing to do with it
sbt "set test in assembly := {}" assembly
and if it still doesn't work, try with
java -cp '.:ksql-jdbc-driver-assembly-1.2.0.jar:' Main
HI, I have used the fat jar. There is no errors but still cant access to Ktable. Can you pls upload some examples about how to use the driver ? Thanks a lot
Hi.
In the usage section in the README file you can see some notes in this sense, and then use it as whichever JDBC driver. Also here you have more info.
Another option could be using SQuirrel SQL client: build the far jar, put into the SQuirrel classpath and connect to KSQL.
Both options work.
Hi, Do I need to set username and password? I cant access to the Ktabke even I put the far jar in SQuirrel SQL . Thanks
Also, Can you pls show me a correct URL format. Thanks
Try putting after the query a EMIT CHANGES LIMIT <NUMBER>
.
Which version of KSQL are you using? Try removing EMIT CHANGES
.
That does not stop is normal behavior if there are less than 4 rows. I also recommend trying to run a SET "auto.offset.reset"="earliest"
before executing that query.
So how can we get the whole table if the query not stop? We are trying to extract the tables the whole tables from KSQL for our applications. If it works, we are going to use the jar. Thanks
So how can we get the whole table if the query not stop? We are trying to extract the tables the whole tables from KSQL for our applications. If it works, we are going to use the jar. Thanks
I try to have my say after spending hours and hours on this. To my knowledge there is no easy and standard way to do it, one of the mechanisms is to exploit the timeout, but it is not the best if the system is slow. Another way is to use the LIMIT clause, specifying the number of lines, but you need to make sure that they are all there for the query to end. To know the number of lines usually in the RDBMS, a SELECT COUNT (*) FROM TABLENAME is used, but KsqlDB currently offers this after so many tricks. One of them is to create a MATERIALIZED VIEW that counts the number of lines, but one should be made for each different query. There is a large debate on this.
Try executing one query at a time
HI, Thanks for your help. Now, we can connect to KSQLDB through Dbeaver. But I want to ask is it possible to use the functions on the left? Thanks for your help
I'm sorry but I've never used DBeaver. However the visualization of the STREAM and the TABLE works, at least I recommend to see what the logs say.