How can I connect to a Snowflake database via JDBC using the "database" command in MATLAB R2022b?

53 visualizzazioni (ultimi 30 giorni)
I am attempting to connect to a Snowflake database via JDBC using the "database" command. I am unclear on the correct syntax for the arguments to this command, as Snowflake is specific regarding parameters and URL formatting. 

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 14 Apr 2023
Modificato: MathWorks Support Team il 19 Apr 2023
Refer to the following for an example MATLAB command to connect to a Snowflake database via JDBC using the "database" function: 
>> conn = database('','<username>','<password>’,'net.snowflake.client.jdbc.SnowflakeDriver','jdbc:snowflake://<account_identifier>.snowflakecomputing.com/?db=<dbname>;') 
Note the following:
  • The database name is passed in as a parameter in the URL, rather than in the first argument or a name-value pair argument.
  • Parameters are included in the URL, rather than in name-value pair arguments.
  • The account identifier is the same as described in the Snowflake documentation: 
  • If you have additional access restrictions such as a region or PrivateLink, they can be included with the account identifier. For example, "myorg.myregion.privatelink.snowflakecomputing.com".

Più risposte (0)

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by