Providing metadata for flat files

TenUp provides three different ways to specify metadata in flat file uploads: command line, table tree, and spec tree.

As stated previously, if you find it too cumbersome to specify all the metadata on the command line, you can use a table tree and/or a spec tree to specify metadata for your uploaded flat file. In general, the table tree describes the metadata in the target table (the one that will be in the 1010data Insights Platform) and the spec tree describes the metadata in the data source. However, the spec tree does provide basic information about the target table, such as table name, so it is possible to use just the spec tree to upload data. If you want to distinguish between source metadata and target metadata, you can use a combination of the table tree and the spec tree to upload data.

Metadata supplied in the TenUp command line takes priority over any metadata provided in either a table tree or a spec tree. Therefore, if you specify --column-names on the command line, it takes precedence over any column names you may have specified in <th name> in the table tree or <name> in the spec tree. Furthermore, table tree metadata takes priority over equivalent spec tree metadata. If no additional sources of metadata are provided, TenUp uses the metadata from the source database, if it is available. You can specify --autospec on the command line to have TenUp fill in your metadata blanks with whatever values it detects.

The command below shows the syntax for specifying a table tree with a flat file [FILE_NAME] as the source:

$ tenup64 -u [USERNAME] -p [PASSWORD] @[TABLE_TREE_FILE].xml [FILE_NAME]
The command below shows the syntax for specifying a spec tree with a flat file as the source. Note that the file name of the flat file is included in the spec tree file, so there is no need to include it in the command line:
$ tenup64 -u [USERNAME] -p [PASSWORD] @[SPEC_TREE_FILE].xml
Finally, the command below shows the syntax for specifying both a table tree and a spec tree for the flat file. Again, the name of the flat file is included in the spec tree file, and is not needed on the command line:
$ tenup64 -u [USERNAME] -p [PASSWORD] @[TABLE_TREE_FILE].xml @[SPEC_TREE_FILE].xml