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

조회 수: 53 (최근 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 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