KNOWLEDGE BASE

Error "plan Should Not Reference Subplan's Variable" When Connecting To Amazon Redshift


Published: 10 Mar 2020
Last Modified Date: 12 Mar 2020

Issue

After connecting to a View in Amazon Redshift, click "Update Now" on datasource page, you may see the error below.

[Amazon][Amazon Redshift] (20) Error occurred while trying to prepare a query: [SQLState XX000] ERROR:  plan should not reference subplan's variable

Environment

  • Tableau Desktop
  • Tableau Server
  • Amazon Redshift

Resolution

Use attached "redshift.tdc" to suppress prepared statement on Tableau side.
Refer to Customize and Tune ODBC Connections to find out where you should save the tdc file to.
 

Cause

The prepared statement/view the Tableau uses to retrieve data sometimes fails with complicated views especially when custom SQL is used.
 
Did this article resolve the issue?