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:ย 

Best ways to copy the parquet files in the staging directory to the Delta table

brickster_2018
Databricks Employee
Databricks Employee

I have some parquet data in a temporary directory. Can I copy them into the delta table directly, what are the best options.

1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

The easiest solution is to use the COPY INTO command. The COPY INTO command ensures idempotency, so even if the operation fails there are no data inconsistencies. COPY INTO command utilizes the resources on the Spark cluster hence completes faster. 

https://docs.databricks.com/spark/latest/spark-sql/language-manual/delta-copy-into.html

View solution in original post

1 REPLY 1

brickster_2018
Databricks Employee
Databricks Employee

The easiest solution is to use the COPY INTO command. The COPY INTO command ensures idempotency, so even if the operation fails there are no data inconsistencies. COPY INTO command utilizes the resources on the Spark cluster hence completes faster. 

https://docs.databricks.com/spark/latest/spark-sql/language-manual/delta-copy-into.html

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