civis.io.transfer_table¶
-
civis.io.transfer_table(source_db, dest_db, source_table, dest_table, job_name=None, api_key=None, client=None, source_credential_id=None, dest_credential_id=None, polling_interval=None, **advanced_options)[source]¶ Transfer a table from one location to another.
Parameters: - source_db : str or int
The name of the database where the source table is located. Optionally, could be the database ID.
- dest_db : str or int
The name of the database where the table will be transfered. Optionally, could be the database ID.
- source_table : str
Full name of the table to transfer, e.g.,
'schema.table'.- dest_table : str
Full name of the table in the destination database, e.g.,
'schema.table'.- job_name : str, optional
A name to give the job. If omitted, a random job name will be used.
- api_key : DEPRECATED str, optional
Your Civis API key. If not given, the
CIVIS_API_KEYenvironment variable will be used.- client :
civis.APIClient, optional If not provided, an
civis.APIClientobject will be created from theCIVIS_API_KEY.- source_credential_id : str or int, optional
Optional credential ID for the source database. If
None, the default credential will be used.- dest_credential_id : str or int, optional
Optional credential ID for the destination database. If
None, the default credential will be used.- polling_interval : int or float, optional
Number of seconds to wait between checks for job completion.
- **advanced_options : kwargs
Extra keyword arguments will be passed to the import sync job. See
post_syncs().
Returns: - results :
CivisFuture A CivisFuture object.
Examples
>>> transfer_table(source_db='Cluster A', dest_db='Cluster B', ... source_table='schma.tbl', dest_table='schma.tbl')