Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
Hope everyone is doing well during these difficult times. I am working on switching a connection from default/public schema to a new schema within the same database, but the variables defined are not working as expected. The connection variables are working fine against the default schema but when I switch to the new schema it is throwing following error message. Below are the variable definitions, any inputs on what the issues on these variables could be greatly appreciated. Thank you,
Error message:
“Connector reply error: SQL##f - SqlState: 42P01, ErrorCode: 30, ErrorMsg: [Qlik][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState 42P01] ERROR: relation "dim_time" does not exist : SQL SELECT”
Let vSQL = 'SELECT $(vFieldList) FROM $(SchemaName)$(vCurrentTable)$(vWhereClause)' ;
let vTable = PurgeChar('$(vCurrentTable)', '[] ');
let vFull_QVD_Name = '$(vQVD_Path)/$(vTable)_Extract.qvd';
$(vCurrentTable):
Load RecNo() as %RecordId, *
;
SQL $(vSQL); // erroring out here
Store $(vCurrentTable) into [$(vFull_QVD_Name)](qvd);
i have figured it out, the issue is with the $(SchemaName), i modified the variable and it worked. Thank you,
Hi @ramyasaiqv
Thank you for the good advice; it seems you got a connection already and it is returning an error message complaining about the variable "dim_time" does not exist as you switched to a different schema, Would it be possible the new schema is out of sync with the public's one?
Hope this helps,
Hi Arnaldo,
Thank you for the response. The “dim_time” table does exist in the new schema but not in the default schema. Even though I am pointing to new schema it looks like qlik is still connecting to the default schema which “dim_time” does not exist. I suspect the below variable is causing the issue. I tried playing around changing the syntax for the below variable but I am not having any luck.
Let vSQL = 'SELECT $(vFieldList) FROM $(SchemaName)$(vCurrentTable)$(vWhereClause)'
Thank you,
Ramya
i have figured it out, the issue is with the $(SchemaName), i modified the variable and it worked. Thank you,