Basic Introduction to Connecting Snowflake to Databricks
Last updated: 2/22/2023
1. Sign Up for the free trial of Snowflake
○ Link: [Link]
○ **There shouldn’t be any prompts at entering any financial information**
2. Navigate to the database tab and create a new database. Then create a new
schema within the database.
○ For this tutorial the database will be “TESTDB” and schema will be
“TEST1”.
○ The data/table from Database will go into the specified schema.
3. Then navigate to the worksheet tab and create a new worksheet.
○ Worksheets are used to write SQL queries to pull data from the database
in snowflake.
4. At this point the “TestDB” doesn't have any data inside it so now it is time to move
on to Databricks to process and transfer the data into the snowflake database.
○ The script below allows a user to connect to Snowflake from Databricks.
○ One of the more helpful tutorials is this YouTube video.
5. In databricks run the below scripts:
○ To get your “sfUrl”: in Snowflake navigate to the “Admin” tab and proceed
to the “Accounts” tab, then hover over the account key until a link symbol
pops up to the right, click of the link symbol to copy your personal URL.
○
● Test to see if the table went through:
○ This is how to query data from snowflake to see specific data.
6. To pull up the data in Snowflake, navigate to the “TESTDB” worksheet and click
on “Table01” under “TEST1”
○ A window where queries can be written should pop up to the right
○ Make sure to choose the correct database from the drop-down menu
for the queries to return the correct data.
7. That's the basics of how to upload data to Snowflake and retrieve/process the
data with Databricks.
8. If there's an error with the JDBC driver please follow this tutorial to download it
using dbeaver a database management tool.