spark-bigquery icon indicating copy to clipboard operation
spark-bigquery copied to clipboard

Write to bigquery using DataframeWriter

Open fbbergamo opened this issue 6 years ago • 2 comments

Is there any problem to implement the writing to Bigquery using DataFrameWriter,

What Do you guys think to implement like the redshift lib?

https://github.com/databricks/spark-redshift/blob/master/src/main/scala/com/databricks/spark/redshift/DefaultSource.scala#L68

I want to use the spark like other formats:

df.write.format("com.samelamin.spark.bigquery").option("writeDisposition", "WRITE_TRUNCATE").save("bigquery-dw:poc_data_pipeline.pricing")

This will help to use this library using the same interface that is already build in my project.

Is there any other way to achieve this?

fbbergamo avatar Aug 01 '18 16:08 fbbergamo

Sorry for the late reply @fbbergamo, It is a good idea, there isnt a specific reason we cant do this, as far as I know its only the redshift connector that uses this, so there isnt really a spark standard to writing a connector

I think we did start writing a class but it really didn't go anywhere

You can look here and send a pr

samelamin avatar Aug 08 '18 22:08 samelamin

@samelamin thanks, I will work on and let you know. :)

fbbergamo avatar Aug 12 '18 18:08 fbbergamo