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

29 次查看(过去 30 天)
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. 

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2023-4-19
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".

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by