Hi, <https://docs.kedro.org/en/stable/data/data_c...
# questions
a
Hi, https://docs.kedro.org/en/stable/data/data_catalog_yaml_examples.html#id15 I'd like to save a pandas dataframe output to a sql table. I'm familiar with reading data from sql table, but not so much on writing to a sql table. Namely, how do I specify the arguments to • append to the existing table • if not append, if I want to replace the rows in the existing table based on some primary keys (date, userID)
j
hi @Afiq Johari! you could define the output of your node as a
pandas.SQLTableDataset
https://docs.kedro.org/projects/kedro-datasets/en/kedro-datasets-2.1.0/api/kedro_datasets.pandas.SQLTableDataset.html and specify
Copy code
save_args:
    if_exists: append
would that work for you?
K 1
a
@Juan Luis this is perfect! thanks
💯 2