Forum Discussion
Write df to DataWarehouse tables
- 1 year ago
hello Anonymous
Prepare the JDBC URL with the correct endpoint, database name, encryption, and authentication
dw_url = (“jdbc:sqlserver://<your_server_identifier>.datawarehouse.fabric.microsoft.com:1433;” “DatabaseName=WideWorldImportersDW;” “encrypt=true;” “Authentication=ActiveDirectoryPassword”)
Provide authentication details in the connection properties
dw_properties = { “driver”: “com.microsoft.sqlserver.jdbc.SQLServerDriver”, “user”: “[email protected]”,“password”: “your_password” }
Write the DataFrame to the target table in the Data Warehouse
df.write.jdbc(url=dw_url, table=“dbo.Employee”, mode=“overwrite”, properties=dw_properties)
hello Anonymous
Prepare the JDBC URL with the correct endpoint, database name, encryption, and authentication
dw_url = (“jdbc:sqlserver://<your_server_identifier>.datawarehouse.fabric.microsoft.com:1433;” “DatabaseName=WideWorldImportersDW;” “encrypt=true;” “Authentication=ActiveDirectoryPassword”)
Provide authentication details in the connection properties
dw_properties = {
“driver”: “com.microsoft.sqlserver.jdbc.SQLServerDriver”,
“user”: “[email protected]”,“password”: “your_password”
}
Write the DataFrame to the target table in the Data Warehouse
df.write.jdbc(url=dw_url, table=“dbo.Employee”, mode=“overwrite”, properties=dw_properties)