Python
morph_lib.database.insert_or_update_records
Updates data in the tables of databases connected via built-in PostgreSQL or SQL Connection. If the Primary Key does not exist, the data will be inserted as a new record.
Supported Databases
- PostgreSQL
Parameters
data
pd.DataFrame
requiredThe actual data to pass to the function. The columns specified in primary_keys must exist.
primary_keys
List[str]
requiredSpecify the column names that will serve as the table’s Primary Key.
table_name
str
requiredSpecify the table name.
connection
str
Destination of the connection other than the registered builtin connection (optional)
*If not specified, it will be set to the built-in PostgreSQL.