dolthub / doltpy

A Python API for Dolt
Apache License 2.0
55 stars 13 forks source link

let get_df_table_writer infer primary keys from df.index #110

Open KIC opened 3 years ago

KIC commented 3 years ago

the function get_df_table_writer expects a list of primary keys which are columns of the data frame. I however have a MultiIndex with names that should be used for the compound primary key. this is very much like the df.to_sql works as well. But I need a way to "REPLACE INTO" instead of inserting. I had the hope the get_df_table_writer function could do that.

oscarbatori commented 3 years ago

@KIC apologies for the late response here. We are doing a round of Doltpy dev work and will add this to the to-do list. I agree that the current behavior is not desirable, but we haven't figured out exactly what the right interface should be.