Databricks streaming dataframe into Snowflake

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2023 09:20 AM
Any suggestions on how to stream data from databricks into snowflake?. Is snowpipe is the only option?. Snowpipe is not faster since it runs copy into in a small batch intervals and not in few seconds. If no option other than snowpipe, how to call it from databricks notebook?. Thx in advance for your help.
Below did not work since my dataDF was streaming dataframe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2023 11:43 PM
@Anonymous
You have to use writeStream instead of write.
.foreachBatch { (batchDF: Dataset[Row], batchId: Long) =>
batchDF.write
.format("snowflake")
.options(sfOptions)
.save()
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2023 10:15 PM
Hi @Anonymous
Hope everything is going great.
Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.
Cheers!

