Reputation: 1223
I have connections details as below and I need to read 2 tables from different schema (Employees and HR),
sfparams = {
"sfURL" : "123.com",
"sfUser" : "a",
"sfPassword" : "b",
"sfDatabase" : "Test",
"sfSchema" : "Employee",
"sfWarehouse" : "PD1"
}
How do I read data from HR schema?
Upvotes: 0
Views: 131
Reputation: 175826
To read data from different schema two part names should be provided, i.e., schema_name.table_name
:
df = spark.read.format(SNOWFLAKE_SOURCE_NAME) \
.options(**sfparams) \
.option("query", "select * from HR.table1") \
.load()
Upvotes: 1