Copy Table

copyed = hc.copy_table("source_table_name", "dest_table_name", "source_database_name", "dest_database_name") 


This method returns a String representing the status of copy operation. If the error pops up when copying table, “ValueError” exception will be raised.

Parameter description:

source_table_name (str)Source table to be copiedYes
dest_table_name (str)Target tableYes
source_database_name (str)Database where source table is locatedNo, defaults to "default" database
dest_database_name (str)Database where target table is locatedNo, defaults to "default" database
remote_info (dict)Remote info, including IP and port of remote serverYes
fields (list)Fields to be copiedYes
fields_projection (list)Fields to be projectedYes
expr (str)Expression, used to filter data to be copiedYes
op_type (str)Operation type, supports “update” and “upsert”No, defaults to "upsert"
wait_for_completion (bool)Whether to wait until the job is doneNo, defaults to True
timeout (str)Operation timeoutNo, defaults to "2m"
Table 70 Copy Table (Python API)