apache-sparkdelta-lake

How to just simple to insert data(rows) to delta table without strange merge syntax?


I have not found in the documentation how to simply insert data without any dancing with a tambourine.Why complicate the API so much is really unclear. Maybe someone knows how to use the good old data insertion?

I tried to use merge syntax, but i do not need any matching data(merge condition), i just need to insert data.


Solution

  • You can use the append mode:

    (data_frame 
                .write 
                .format("delta") 
                .mode("append") 
                .save(TARGET_LOCATION_PATH))