CUSTOM_SQL_LENGTH_DANGEROUS in new release

In the latest release, all of my custom SQL that has very long SQL is breaking. I have some union queries against redshift that are 12,000 lines long. This is proven SQL that populates its results into Spice. As of the new release, when trying to create a new dataset using this SQL, or using the CLI to migrate our dataset, we get validation errors in the CLI due to SQL size, and in the GUI, we cannot save that query, or edit it, without throwing an error about the length of the query. The CLI give an error “physicalTableMap.f9e9ab23-3f03-4781-a722-24fca0398a95.member.customSql.sqlQuery’ failed to satisfy constraint: Member must have length less than or equal to 65536”.

Why was this changed, and how can we circumvent this problem in Quicksight?

Hi @oanielsen,

Please refer this links to get more insights on this error that you are getting. I hope this might help.

Link 1 - Quicksight dataset with API table map

Link 2 - Quicksight API

Let us know, if still you have any questions.

Thank you,
Shravya

Your response has nothing to do with my question. My question is specifically about very long custom sql statements. These stopped being possible after the quicksight upgrade last week.

Hi @oanielsen. Thanks for your question. We have forwarded this on to our team for review. Also, please see direct message from @bergqdou. Thx.

Hi @oanielsen - Thanks for the questions and details. Just check whether the number of character in the SQL exceeded 65536 or not. As you mentioned number of lines is 12000 and due to this number of characters may exceeded 65536 limit. We can highlight this limitation to QuickSight team.

In parallel as a work around solution, can you please create a view for your sql and bring that view to QuickSight now. Essentially the whole logic will run in database and from QS stand point, it is a view representation. Even if for complex implementation, we always suggested customer to follow the view approach to have a clean code and all details code will be at DB level.

Regards - Sanjeeb

1 Like