client.imports.patch_syncs
A method of the Imports endpoint.
- patch_syncs(id: int, sync_id: int, *, source: dict = None, destination: dict = None, advanced_options: dict = None) Response
Update some attributes of this sync
API URL:
PATCH /imports/{id}/syncs/{sync_id}import civis client = civis.APIClient() response = client.imports.patch_syncs(...)
- Parameters:
- idint
The ID for the import.
- sync_idint
The ID of the sync to fetch.
- sourcedict, optional
- database_tabledict
- schemastr
The database schema name.
- tablestr
The database table name.
- use_without_schemabool
This attribute is no longer available; defaults to false but cannot be used.
file : dict
- google_worksheetdict
- spreadsheetstr
The spreadsheet document name.
- spreadsheet_idstr
The spreadsheet document id.
- worksheetstr
The worksheet tab name.
- worksheet_idint
The worksheet tab id.
- destinationdict, optional
- database_tabledict
- schemastr
The database schema name.
- tablestr
The database table name.
- use_without_schemabool
This attribute is no longer available; defaults to false but cannot be used.
- google_worksheetdict
- spreadsheetstr
The spreadsheet document name.
- spreadsheet_idstr
The spreadsheet document id.
- worksheetstr
The worksheet tab name.
- worksheet_idint
The worksheet tab id.
- advanced_optionsdict, optional
- max_errorsint
For Google Doc and Auto Imports. The maximum number of errors that can occur without the job failing.
- existing_table_rowsstr
For Google Doc and Auto Imports. The behavior if a table with the requested name already exists. One of “fail”, “truncate”, “append”, or “drop”. Defaults to “fail”.
- first_row_is_headerbool
For Google Doc and Auto Imports. A boolean value indicating whether or not the first row is a header row.
- diststylestr
For Auto Imports. The diststyle to use for a Redshift table.
- distkeystr
For Auto Imports. The distkey to use for a Redshift table.
- sortkey1str
For Auto Imports. The first sortkey to use for a Redshift table.
- sortkey2str
For Auto Imports. The second sortkey to use for a Redshift table.
- column_delimiterstr
For Auto Imports. The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. If column_delimiter is null or omitted, it will be auto-detected.
- column_overridesdict
For Auto Imports. Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escapedbool
For Auto Imports. If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_columnstr
For DB Syncs. The column or columns to use as primary key for incremental syncs. Should be a unique identifier. If blank, primary key columns will be auto-detected. If more than one identity column is specified, an identity column must be specified for each table. We recommend the primary key be a sequential data type such as an integer, double, timestamp, date, or float. If using a primary key that is a string data type, we recommend having a last_modified_column to ensure all data is synced to the destination table.
- last_modified_columnstr
For DB Syncs. The column to use to detect recently modified data for incremental syncs. Defaults to “Auto-Detect”, which will use the first column it finds containing either “modif” or “update” in the name. When specified, only rows where last_modified_column in the source >= last_modified_column in the destination will be synced.
- row_chunk_sizeint
For DB Syncs. If specified, will split the sync into chunks of this size.
- wipe_destination_tablebool
For DB Syncs. If true, will perform a full table refresh.
- truncate_long_linesbool
For DB Syncs to Redshift. When true, truncates column data to fit the column specification.
- invalid_char_replacementstr
For DB Syncs to Redshift. If specified, will replace each invalid UTF-8 character with this character. Must be a single ASCII character.
- verify_table_row_countsbool
For DB Syncs. When true, an error will be raised if the destination table does not have the same number of rows as the source table after the sync.
- partition_column_namestr
This parameter is deprecated
- partition_schema_namestr
This parameter is deprecated
- partition_table_namestr
This parameter is deprecated
- partition_table_partition_column_min_namestr
This parameter is deprecated
- partition_table_partition_column_max_namestr
This parameter is deprecated
- mysql_catalog_matches_schemabool
This attribute is no longer available; defaults to true but cannot be used.
- chunking_methodstr
This parameter is deprecated
- export_actionstr
For Google Doc Exports. The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet. Default is set to “newsprsht”
- sql_querystr
For Google Doc Exports. The SQL query for the export.
- contact_listsstr
This parameter is deprecated
- soql_querystr
This parameter is deprecated
- include_deleted_recordsbool
This parameter is deprecated
- Returns:
civis.Responseid : int
- source
civis.Response - idint
The ID of the table or file, if available.
- database_table
civis.Response - schemastr
The database schema name.
- tablestr
The database table name.
- use_without_schemabool
This attribute is no longer available; defaults to false but cannot be used.
- database_table
- file
civis.Response - idint
The file id.
- namestr
The file name.
- file
- google_worksheet
civis.Response - spreadsheetstr
The spreadsheet document name.
- spreadsheet_idstr
The spreadsheet document id.
- worksheetstr
The worksheet tab name.
- worksheet_idint
The worksheet tab id.
- google_worksheet
- source
- destination
civis.Response - database_table
civis.Response - schemastr
The database schema name.
- tablestr
The database table name.
- use_without_schemabool
This attribute is no longer available; defaults to false but cannot be used.
- database_table
- google_worksheet
civis.Response - spreadsheetstr
The spreadsheet document name.
- spreadsheet_idstr
The spreadsheet document id.
- worksheetstr
The worksheet tab name.
- worksheet_idint
The worksheet tab id.
- google_worksheet
- destination
- advanced_options
civis.Response - max_errorsint
For Google Doc and Auto Imports. The maximum number of errors that can occur without the job failing.
- existing_table_rowsstr
For Google Doc and Auto Imports. The behavior if a table with the requested name already exists. One of “fail”, “truncate”, “append”, or “drop”. Defaults to “fail”.
- first_row_is_headerbool
For Google Doc and Auto Imports. A boolean value indicating whether or not the first row is a header row.
- diststylestr
For Auto Imports. The diststyle to use for a Redshift table.
- distkeystr
For Auto Imports. The distkey to use for a Redshift table.
- sortkey1str
For Auto Imports. The first sortkey to use for a Redshift table.
- sortkey2str
For Auto Imports. The second sortkey to use for a Redshift table.
- column_delimiterstr
For Auto Imports. The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. If column_delimiter is null or omitted, it will be auto-detected.
- column_overrides
civis.Response For Auto Imports. Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- column_overrides
- escapedbool
For Auto Imports. If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_columnstr
For DB Syncs. The column or columns to use as primary key for incremental syncs. Should be a unique identifier. If blank, primary key columns will be auto-detected. If more than one identity column is specified, an identity column must be specified for each table. We recommend the primary key be a sequential data type such as an integer, double, timestamp, date, or float. If using a primary key that is a string data type, we recommend having a last_modified_column to ensure all data is synced to the destination table.
- last_modified_columnstr
For DB Syncs. The column to use to detect recently modified data for incremental syncs. Defaults to “Auto-Detect”, which will use the first column it finds containing either “modif” or “update” in the name. When specified, only rows where last_modified_column in the source >= last_modified_column in the destination will be synced.
- row_chunk_sizeint
For DB Syncs. If specified, will split the sync into chunks of this size.
- wipe_destination_tablebool
For DB Syncs. If true, will perform a full table refresh.
- truncate_long_linesbool
For DB Syncs to Redshift. When true, truncates column data to fit the column specification.
- invalid_char_replacementstr
For DB Syncs to Redshift. If specified, will replace each invalid UTF-8 character with this character. Must be a single ASCII character.
- verify_table_row_countsbool
For DB Syncs. When true, an error will be raised if the destination table does not have the same number of rows as the source table after the sync.
- partition_column_namestr
This parameter is deprecated
- partition_schema_namestr
This parameter is deprecated
- partition_table_namestr
This parameter is deprecated
- partition_table_partition_column_min_namestr
This parameter is deprecated
- partition_table_partition_column_max_namestr
This parameter is deprecated
- mysql_catalog_matches_schemabool
This attribute is no longer available; defaults to true but cannot be used.
- chunking_methodstr
This parameter is deprecated
- export_actionstr
For Google Doc Exports. The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet. Default is set to “newsprsht”
- sql_querystr
For Google Doc Exports. The SQL query for the export.
- contact_listsstr
This parameter is deprecated
- soql_querystr
This parameter is deprecated
- include_deleted_recordsbool
This parameter is deprecated
- advanced_options