This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Upgrading Server to version 22.1? We’ve enabled the faster AMP engine by default. Read about how these system settings changes might affect you.
Hello,
I'm attempting to parameterize the schema value in the ODBC connection string for an InDB connection to Snowflake and can't figure out how to pass a value in.
Snowflake users often switch roles depending upon their activity and creating a new ODBC connection for every role seems cumbersome. The best way this can be accomplished is to parameterize the ODBC connection which contains schema and role.
The connection string is as follows:
odbc:DSN=SnowflakeODBC;UID=dpearce;PWD=__EncPwd1__;SCHEMA=myschema;ROLE=myrole
I can adjust the schema and role when I change these manually in the ODBC connection, but cannot pass in values without touching the ODBC connection. I've tried both user connection and file connection.
Any suggestions would be helpful,
Darin
I haven't tested this but couldn't you use the Pre SQL Statement to USE ROLE <role_name> and then wrap the connection and input data tool in a macro?
I'll try and send an example when I've got a bit more time to spare