--rename

Upload the subset of directories/tables matching a particular path in the source database to a different path in the destination database.

Syntax

--rename=[SRCPREFIX]=[DSTPREFIX]

Description

Data Hauler renames any directory or table specified by [SRCPREFIX] to [DSTPREFIX] when that directory or table is copied. [SRCPREFIX] matches a directory/table if it is a prefix of the dot-separated path to the directory/table in the source database.

--rename is used primarily to change the depth of a table when it is uploaded into 1010data Insights Platform. For more information, see Data Hauler: Changing the depth of a table.

If you want to change multiple tables or directories, you must use the --rename switch multiple times.

You can add --rename to a configuration file so that you do not have to enter it on the command line. See --config for more information on creating a configuration file.

Example

Change the depth of a table with the source database path of State.County.City.School.PS118 to appear in a top level folder, Schools, in 1010data Insights Platform.
$ datahaul64 [DATABASE_TYPE] -u [USERNAME] 
-C [CONNSTR] -d schools 
--rename=State.County.City.School.ps118=ps118

No new directory is created in 1010data Insights Platform and the ps118 table is copied directly into the schools folder, resulting in the table path schools.ps118.

Example

The following command changes the name of the asmith directory to mysales:
$ datahaul64 [DATABASE_TYPE] -u [USERNAME] 
-C [CONNSTR] -d example 
--rename=salesdepartment.asmith=salesdepartment.mysales

In the source system, the sales table has the path salesdepartment.asmith.sales. In 1010data Insights Platform, the uploaded table has the path example.salesdepartment.mysales.sales.