Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Data Access
Created by Guest
Created on Apr 7, 2024

reduce sql statement length for data connection

Customer is facing error as below that indicates the length of SQL exceeds the limite by the database when loading data from Google BigQuery via connector/data connection.


The query is too large. The maximum standard SQL query length is 1024.00K characters, including comments and white space characters. [400]


The reason for this error is that the name of the database, table are too long and number of columns is large, so Spotfire composes a SQL as below which is too long.

SELECT `very-long-database-name.long-schema-name.long-table-name`.`column-1` AS `column-1`, `very-long-database-name.long-schema-name.long-table-name`.`column-2` AS `column-2`, `very-long-database-name.long-schema-name.long-table-name`.`column-3` AS `column-3`,... from very-long-database-name.long-schema-name.long-table-name


The database name, table name are repeated on each column so the total length of SQL is getting larger while number of columns increases.


We tried to use custom query but Spotfire still produces SQL with a long alias SpotfireCustomQuery1 so it didn't work for our use case.

SELECT `SpotfireCustomQuery1`.`WAFER_ID` AS `WAFER_ID`, `SpotfireCustomQuery1`.`LOT_NO` AS `LOT_NO`, ... FROM (select * from mytable) AS `SpotfireCustomQuery1`


Please add option to use short alias to reduce the SQL statement.

(1) omit unnecessary name(database name, table name, etc) as much as possible

(2) use short alias for table name

(3) use short alias instead of SpotfireCustomQuery1 which is too long.


  • Attach files