Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DQ Open studio connection to Snowflake, All analysis are failing to run

DQ Open studio connection to Snowflake, All analysis are failing to run with the exception below

net.snowflake.client.jdbc.SnowflakeSQLException: Cannot perform SELECT. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.

 

Is there any super override where I can set the USE Database command?

Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hello,

Here exists a jira issue:https://jira.talendforge.org/browse/TDQ-17324. Let us know if it is what you are looking for.

Best regards

Sabrina

Anonymous
Not applicable
Author

this solution will not work for me, to reiterate none of the analyses are working as each and every SQL statement is expecting as 'USE DATABASE'  as first statement to execute the query and didnt anyway to set this up.  if this is not possible, is there export all the SQL queries so that I can execute them manually, by adding the USE DATABASE command as first line ?

Below is the error

net.snowflake.client.jdbc.SnowflakeSQLException: Cannot perform SELECT. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowExceptionSub(SnowflakeUtil.java:135)
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:60)
at net.snowflake.client.core.StmtUtil.pollForOutput(StmtUtil.java:503)
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:370)
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:474)
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:230)
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:172)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:663)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeInternal(SnowflakeStatementV1.java:205)
at net.snowflake.client.jdbc.SnowflakeStatementV1.execute(SnowflakeStatementV1.java:243)
at org.talend.dq.analysis.ColumnAnalysisSqlExecutor.executeQuery(ColumnAnalysisSqlExecutor.java:1493)
at org.talend.dq.analysis.ColumnAnalysisSqlExecutor.executeQuery(ColumnAnalysisSqlExecutor.java:1440)
at org.talend.dq.analysis.ColumnAnalysisSqlParallelExecutor.run(ColumnAnalysisSqlParallelExecutor.java:112)
at org.talend.dq.analysis.ColumnAnalysisSqlExecutor$ExecutiveAnalysisJob.run(ColumnAnalysisSqlExecutor.java:1243)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

 

 

 

msjian
Employee
Employee

hello

which version of studio are you using?

from 721 we begin to support Profiling Connection for Snowflake with JDBC Driver

can see https://jira.talendforge.org/browse/TDQ-16610 

and its link bugs

 

thanks

Jian

Anonymous
Not applicable
Author

Talend Open Profiler Version: 7.2.1

 

and I tried accessing the JIRA bug and couldn't access it

Anonymous
Not applicable
Author

Talend Open Profiler Version: 7.2.1

and I tried accessing the JIRA bug and couldn't access it

koen_v
Contributor
Contributor

Hi,

 

You can use the "db=MYDATABASENAME" parameter in the JDBC connection string. This sets the active database.

Also specify the warehouse that Snowflake needs to use to perform your query with "warehouse=WAREHOUSENAME".

 

See: https://docs.snowflake.net/manuals/user-guide/jdbc-configure.html

 

Kind regards,

Koen