shareef shaik
06/20/2023, 7:57 AMWill Jones
06/20/2023, 2:31 PMshareef shaik
06/21/2023, 2:30 PMWill Jones
06/21/2023, 2:44 PMshareef shaik
06/22/2023, 8:49 AMfrom deltalake.writer import write_deltalake
>>> df = pd.DataFrame({'x': [1, 2, 3], 'y': ['a', 'a', 'b']})
>>> write_deltalake('path/to/table', df, partition_by=['y'])
>>> table = DeltaTable('path/to/table')
>>> df2 = pd.DataFrame({'x': [100], 'y': ['b']})
>>> write_deltalake(table, df2, partition_filters=[('y', '=', 'b')], mode="overwrite")
>>> table.to_pandas()
x y
0 1 a
1 2 a
2 100 b
in this example as it should overwrite the file of partition y, but this is not updating the partition file .Will Jones
06/22/2023, 2:37 PM