Data Hauler: Using a wildcard character

Some Data Hauler options recognize the * (asterisk) as a wildcard character, which mimics Bash glob expansion, to specify multiple directories and tables.

The * stands in for zero or more characters. Similar to the function of *.txt. which would return all of the files with a .txt extension, the asterisk takes the place of directory or table names.

The following options accept the wildcard character:

Example 1

You have the following tables:
  • bar
  • baz
  • blah
  • boo

You want to exclude tables beginning with ba from your load. You would use --blacklist=ba* to keep those tables from uploading. The blah and boo tables are uploaded.

Example 2

You have the following directory structure in your source database:

Assume each Sales[YEAR] folder contains the same sub-folders, which contain a table of the quarterly sales figures.

If you wanted to upload every Pharmacy record to the store001 directory in 1010data Insights Platform, you would use the command:
datahaul64 [DATABASE_TYPE] -u [USERNAME] -C [CONNSTR] -d bigmart.store001 --whitelist=Sales.*.Pharmacy*

Data Hauler would create the following directories and tables in 1010data Insights Platform.