konikvranik / jdbc-influxdb

Apache License 2.0
7 stars 1 forks source link

InteliJ DataGrip crashes when using this driver #60

Closed TomlDev closed 1 year ago

TomlDev commented 1 year ago

Hello, first thanks for your effort! I stumbled over this driver when searching for a possibility to use DataGrip to query InfluxDB. https://youtrack.jetbrains.com/issue/DBE-5158/InfluxDB-support#focus=Comments-27-6760331.0-0

I tried to use it and DataGrip crashes using influxdb-jdbc-0.1.0-alpha.1.jar and influxdb-jdbc-0.1.0-alpha.jar. datagrip-crash

My configuration: DataSource: grafik Driver: grafik

Can you share your configuration? Thanks.

konikvranik commented 1 year ago

Hi @TomlDev,

try url with http scheme too: jdbc:influxdb:http://HOSTNAME:8086?db=DBNAME

I also use two url templates: jdbc:influxdb:http://{host:identifier:localhost}:{port:port:8086}\?db={database:database:test} jdbc:influxdb:http://{user:identifier:username}:{password:identifier:pawwsord}@{host:identifier:localhost}:{port:port:8086}\?db={database:database:test}

TomlDev commented 1 year ago

I reinstalled DataGrip and used your setup. Now I can send queries, but they fail: grafik

Configuration: Driver: grafik DataSource: grafik

konikvranik commented 1 year ago

Hi @TomlDev, try version 0.2.2 - it works for me in current Jetbrains IDE and InfluxDB 1.8.

TomlDev commented 1 year ago

Ah maybe the query was just the problem. With

SELECT t.*
  FROM wiot.deviceReadings t where t.time > now() - 5d

It works 👍🏽

konikvranik commented 1 year ago

Thank you for the feedback. I added some additional mappings from SQL provided by the IDE to the InfluxDB syntax which is slightly different than SQL. But there could still be features that are not covered, so let me know in this case with the problematic query and I'll try to add additional mappings as soon as I have a bit of free time.