cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

BigQuery - Delete or update from Databricks?

Kayla
Valued Contributor

I'm trying to sync a delta table in Databricks to a BigQuery table. For the most part, appending is sufficient, but occassionally we need to overwrite rows - which we've only been able to do by overwriting the entire table.

Is there any way to do updates/deletes or partial overwrites to BigQuery from within Databricks?

2 REPLIES 2

Anonymous
Not applicable

@Kayla Pomakoyโ€‹ :

I would like you to use DBSQL capability instead of BigQuery. Feel free to get in touch with the SA if you are an existing customer ๐Ÿ™‚ We can tell you value of using DBSQL.

Asides, yes there is a BigQuery API to create a connection between your Databricks notebook and the BigQuery table. To tackle update or delete specific rows in a BigQuery table, you can use SQL statements such as UPDATE or DELETE with a WHERE clause that specifies the rows to modify. Finally, Read the updated BigQuery table back into Databricks as a DataFrame using the BigQuery Connector for Spark.

Anonymous
Not applicable

Hi @Kayla Pomakoyโ€‹ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group