-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Summary
I would like the jdbc input plugin to be able to execute multiple statements, including the creation of temporary tables.
Datails
I would like to connect to Google Cloud's BigQuery using the logstash jdbc input plugin.
https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers
BigQuery sometimes gives the following error when executing a single query that requires many with and join clauses.
Resources exceeded during query execution: Not enough resources for query planning - too many subqueries or query is too complex
Therefore, creating temporary tables and splitting the query can reduce complexity and errors.
However, when I try to create a table with the jdbc input plugin, I get the following error
Java::JavaSql::SQLDataException: [Simba][JDBC](11300) A ResultSet was expected but not generated from query ...
One possible cause is that the method called internally is java.sql.Statement.executeQuery.
This method does not allow DDL to be included and does not allow multi-statement queries.
If it is java.sql.Statement.execute, it is also applicable to multi-statement queries and can include DDL.