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 月 14 日
編集済み: 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 Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by