Open d-thomson opened 5 years ago
You can set properties in the driver setting the flag properties=true
and adding the properties you like. Besides that, you can also configure the timeout
property to end the query if the data is not coming.
Thanks for that. I was able to get the timeout working however still having some difficulty working with setting properties. Using the following URL:
jdbc:ksql://<ksql-host>:<port>?timeout=1000&propteries=true&auto.offset.reset=earliest
doesn't seem to set that property for the request. I was able to set this property globally in the KSQL config with the form auto.offset.reset=earliest
and in the KSQL shell using SET 'auto.offset.reset' = 'earliest';
however via the JDBC URL it doesn't seem to set. Trying to add quotes, or using SET cant pass the regex check.
Hi Mario,
Thank you for the new release of the driver, I am now able to connect to a KSQL instance. I am able to query metadata (SHOW STREAMS; SHOW TABLES; etc.) however I am having trouble finding a way to query old data from a table where the query wont hang.
The code snippet I'm using:
The issue seems to be that the pointer for a table is always at the latest position, so when I run the query the driver seems to hang because there is no data coming in. I see that there is a way to set the offset to the earliest position using the following command
SET 'auto.offset.reset' = 'earliest';
but this doesn't seem to be supported by the driver. Do you know if there is a way to set this globally for the KSQL instance or if there's a way to specify this in the query itself?
Much appreciated. Daniel