doltpy icon indicating copy to clipboard operation
doltpy copied to clipboard

let get_df_table_writer infer primary keys from df.index

Open KIC opened this issue 4 years ago • 1 comments

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.

KIC avatar Nov 28 '20 13:11 KIC

@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.

oscarbatori avatar Dec 17 '20 00:12 oscarbatori