civis.io.transfer_table

civis.io.transfer_table(source_db: str | int, dest_db: str | int, source_table: str, dest_table: str, job_name: str | None = None, client: APIClient | None = None, source_credential_id: int | None = None, dest_credential_id: int | None = None, polling_interval: int | float | None = None, **advanced_options) CivisFuture[source]

Transfer a table from one location to another.

Parameters:
source_dbstr or int

The name of the database where the source table is located. Optionally, could be the database ID.

dest_dbstr or int

The name of the database where the table will be transfered. Optionally, could be the database ID.

source_tablestr

Full name of the table to transfer, e.g., 'schema.table'.

dest_tablestr

Full name of the table in the destination database, e.g., 'schema.table'.

job_namestr, optional

A name to give the job. If omitted, a random job name will be used.

clientcivis.APIClient, optional

If not provided, an civis.APIClient object will be created from the CIVIS_API_KEY.

source_credential_idint, optional

Optional credential ID for the source database. If None, the default credential will be used.

dest_credential_idint, optional

Optional credential ID for the destination database. If None, the default credential will be used.

polling_intervalint or float, optional

Number of seconds to wait between checks for job completion.

**advanced_optionskwargs

Extra keyword arguments will be passed to the import sync job. See post_syncs().

Returns:
resultsCivisFuture

A CivisFuture object.

Examples

>>> import civis
>>> civis.io.transfer_table(source_db='Cluster A', dest_db='Cluster B',
...                         source_table='schma.tbl', dest_table='schma.tbl')