I am not able to select data from the Snowflake tables in my library. I can see the data in the library within the folder view of SAS Enterprise Guide, but I am getting various errors when trying to select it. I am using the SAS Grid and am trying to prove that I can connect to Snowflake using JDBC.
What am I doing wrong?
/*I see content in the library within SAS Enterprise Guide*/
libname snow1 jdbc driver='net.snowflake.client.jdbc.SnowflakeDriver'
classpath='/sas/scripts/snowflake/snowflake-jdbc-3.13.5.jar'
URL='jdbc:snowflake://poc.east-us-2.azure.snowflakecomputing.com'
user="duser"
password="dpass"
schema='DATA_SC';
/* no content */
libname snow11 jdbc driver='net.snowflake.client.jdbc.SnowflakeDriver'
classpath='/sas/scripts/snowflake/snowflake-jdbc-3.13.5.jar'
URL='jdbc:snowflake://poc.east-us-2.azure.snowflakecomputing.com'
user="duser"
password="dpass"
schema='DATA_SC';
database='ANALYTICS_DB';
/* no content */
libname snow2 jdbc driver='net.snowflake.client.jdbc.SnowflakeDriver'
classpath='/sas/scripts/snowflake/snowflake-jdbc-3.13.5.jar'
URL='jdbc:snowflake://poc.east-us-2.azure.snowflakecomputing.com:443/?account=poc.east-us-2.azure&warehouse=ANALYST_WH&db=ANALYTICS_DB&schema=DATA_SC'
user="duser"
password="dpass"
schema='DATA_SC';
database='ANALYTICS_DB';
/*ERROR: Prepare 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.*/
proc sql;
create table work.snowData51 as
select * from snow1.DENTAL;
run;
/*ERROR: Prepare 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. */
proc sql;
create table work.snowData512 as
select * from snow11.DENTAL;
run;
/*ERROR: File SNOW2.DENTAL.DATA does not exist.*/
proc sql;
create table work.snowData52 as
select * from snow2.DENTAL;
run;
/*ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE. */
proc sql;
create table work.snowData71 as
select * from snow1.DATA_SC.DENTAL;
run;
/*ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE. */
proc sql;
create table work.snowData81 as
select * from snow1.ANALYTICS_DB.DATA_SC.DENTAL;
run;