Describe the bug
I am trying to connect to a remote OpenDistro (v1.13.2) using Tableau (v2021.1) via the JDBC driver (opendistro-sql-jdbc-1.13.0.0.jar). Tableau is able list the indexes and the fields in each index. It is able to associate the data type of each field appropriately (STRING vs DOUBLE etc). However, when I try to create a Tableau chart by dragging/dropping index fields into the Tableau column/row boxes, I get the following error:
2021-05-06 13:16:03.900 -0500 (,,,,2,77) grpc-default-executor-6 : INFO com.tableau.connect.service.ProtocolService - Running query
SELECT kibana_sample_data_flights
.Carrier
AS Carrier
FROM kibana_sample_data_flights
GROUP BY kibana_sample_data_flights
.Carrier
2021-05-06 13:16:03.900 -0500 (,,,,2,77) grpc-default-executor-6 : INFO com.tableau.connect.grpc.GrpcProtocolService - End local request 77 /runQuery.
2021-05-06 13:16:03.911 -0500 (,,,,2,77) pool-3-thread-4 : INFO com.tableausoftware.jdbc.FetchSizeHelpers - Setting max result buffer size to 322122547 bytes, 30% of the max heap size.
2021-05-06 13:16:03.911 -0500 (,,,,2,77) pool-3-thread-4 : INFO com.tableausoftware.jdbc.FetchSizeHelpers - Setting adaptive fetch size to 2000.
2021-05-06 13:16:03.911 -0500 (,,,,2,77) pool-3-thread-4 : INFO com.tableausoftware.data.ProtobufJDBCResultSet - BindingInfo{columnName='Carrier', columnTypeName='DOUBLE', columnLabel='Carrier', columnType=8, precision=15, scale=0, columnDisplaySize=25, protobufType=DOUBLE, nullable=unknown}
2021-05-06 13:16:03.911 -0500 (,,,,2,77) pool-3-thread-4 : ERROR com.tableau.connect.service.QueryTask - Query for protocol 2 exiting with error class java.sql.SQLDataException
2021-05-06 13:16:03.911 -0500 (,,,,2,78) grpc-default-executor-6 : ERROR com.tableau.connect.grpc.GrpcProtocolService - Failed in fetchResults. SQLState=null, ErrorCode=0.
java.sql.SQLDataException: Can not parse Logstash Airways as a Double
To Reproduce
Steps to reproduce the behavior:
- Open up Tableau 2021.1
- Select "Other Databases (JDBC)".
- In the "Other Databases (JDBC) dialog type:
- URL: jdbc:elasticsearch://https://[remote-opendistro-server-dns-or-ip]:9200/
- Dialect: you can select any one but I selected MySQL
- Username: [userid for your local OpenDistro]
- Password: [password for your local OpenDistro]
- Properties file: [path to your properties file]. Create a properties file with the following contents:
- auth=BASIC
- hostnameVerification=true
- user=xxxxx
- password=xxxxx
- trustSelfSigned=true
- useSSL=true
- trustStoreLocation=[path to jks file]
- trustStorePassword=xxxxx
-
Click on "Sign In" button
-
In the next screen select the desired table/index. I selected the kibana_sample_data_flights index. You should then see the field names from the index displayed.
-
Click on the "Sheet 1" tab to create a new chart.
-
Drag/Drop a string field into the "Columns/Rows" boxes. I dragged the "Carrier" field into the Columns box You should then get an error like:
An error occurred while communicating with the Other Databases (JDBC) data source 'kibana_sample_data_flights (jdbc:elasticsearch://https://wd14efkode01.aci.awscloud:9200/)'
Bad Connection: Tableau could not connect to the data source.
Error Code: FAB9A2C5
Can not parse Logstash Airways as a Double
SELECT kibana_sample_data_flights
.Carrier
AS Carrier
FROM kibana_sample_data_flights
GROUP BY kibana_sample_data_flights
.Carrier
-
Check the Tableau logs and you will see that the error is:
java.sql.SQLDataException: Can not parse Logstash Airways as a Double
at com.amazon.opendistroforelasticsearch.jdbc.types.TypeHelper.stringConversionException(TypeHelper.java:33) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.types.DoubleType.asDouble(DoubleType.java:50) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.types.DoubleType.fromValue(DoubleType.java:38) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.types.DoubleType.fromValue(DoubleType.java:22) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.types.BaseTypeConverter.convert(BaseTypeConverter.java:60) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.ResultSetImpl.getObjectX(ResultSetImpl.java:589) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.ResultSetImpl.getObjectX(ResultSetImpl.java:583) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.ResultSetImpl.getDoubleX(ResultSetImpl.java:305) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.ResultSetImpl.getDouble(ResultSetImpl.java:299) ~[?:?]
at com.tableausoftware.data.ProtobufJDBCResultSet.addValue(ProtobufJDBCResultSet.java:451) ~[jdbcserver.jar:20211.0.17]
at com.tableausoftware.data.ProtobufJDBCResultSet.addRow(ProtobufJDBCResultSet.java:410) ~[jdbcserver.jar:20211.0.17]
at com.tableausoftware.data.ProtobufJDBCResultSet.fetchRows(ProtobufJDBCResultSet.java:230) ~[jdbcserver.jar:20211.0.17]
at com.tableausoftware.data.ProtobufJDBCResultSet.nextBlockImpl(ProtobufJDBCResultSet.java:282) ~[jdbcserver.jar:20211.0.17]
at com.tableausoftware.data.ProtobufResultSet.nextBlock(ProtobufResultSet.java:48) ~[jdbcserver.jar:20211.0.17]
at com.tableau.connect.service.QueryTask.readData(QueryTask.java:139) ~[jdbcserver.jar:20211.0.17]
at com.tableau.connect.service.QueryTask.call(QueryTask.java:102) ~[jdbcserver.jar:20211.0.17]
at com.tableau.connect.service.QueryTask.call(QueryTask.java:56) ~[jdbcserver.jar:20211.0.17]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.NumberFormatException: For input string: "Logstash Airways"
at jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseDouble(Unknown Source) ~[?:?]
at java.lang.Double.parseDouble(Unknown Source) ~[?:?]
at java.lang.Double.valueOf(Unknown Source) ~[?:?]
at com.amazon.opendistroforelasticsearch.jdbc.types.DoubleType.asDouble(DoubleType.java:48) ~[?:?]
... 19 more
Or for query issues:
- Create the index with test documents by 'POST ...'
- Run the query 'SELECT ...'
- See error
Expected behavior
I expect that the integration between Tableau/OpenDistro via JDBC driver works for the remote OpenDistro like it does for the local Opendistro.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [RedHat Linux]
- Version [Red Hat Enterprise Linux Server 7.9 (Maipo)]
- Kernel: Linux 3.10.0-1160.25.1.el7.x86_64
- OpenDistro v1.13.2
- Tableau Desktop For Mac v2021.1
Additional context
Add any other context about the problem here.