Loading data from a flat file

TenUp can load data from a flat file into 1010data Insights Platform while preserving the integrity of the original data.

To load a table from a flat file, TenUp needs to know the location of the flat file, the location of the new table in 1010data Insights Platform, and the metadata about the table you want to create. There are several different ways to accomplish each task.

Location of the flat file
You can supply TenUp with a path to the flat file as an argument on the command line. Alternatively, you can supply file information in a spec tree file and invoke the spec tree file when you run TenUp.
Location of the new table
You can supply TenUp with a path to the new table as an argument on the command line. Alternatively, you can supply the path to the new table in a table tree file. The file is called as an argument in the TenUp command.
Metadata about the table
You can supply TenUp with metadata information on the command line, in the table tree, and/or the spec tree, in order of precedence. For example, if you supply a table title in the command line switch -t [TITLE] and in the table tree, the table title supplied on the command line takes precedence.

You can also use the --auto-spec switch in the command line to have TenUp fill in metadata blanks with values it detects.

For more details about assigning metadata to an uploaded table, see TenUp: Providing Metadata.

Option analog table provides a reference for assigning metadata on the command line, table tree, and spec tree.

The following is a basic TenUp command for uploading a flat file to 1010data Insights Platform:

$ tenup64 -u [USERNAME] -p [PASSWORD] [NEW_TABLE] [FILE_NAME]

This TenUp command has the following components:

tenup64/tenup32/tenup
This command invokes TenUp for your operating system. All TenUp commands begin with one of these options.
-u [USERNAME]
Your 1010data Insights Platform user name.
-p [PASSWORD]
Your 1010data Insights Platform password. If you do not provide a password, TenUp automatically prompts you for it.
[NEW_TABLE] or @[TABLE_TREE_FILE]
[NEW_TABLE] is the complete path of the new table that will be created in 1010data Insights Platform. See 1010data Insights Platform file structure for more information about table paths in 1010data Insights Platform.

If [NEW_TABLE] is a directory, TenUp generates a unique table name with the format "[USERNAME]_[SECONDS_SINCE_JANUARY_1_1970]_[TENUP_PROCESS_ID]".

@[TABLE_TREE_FILE] is the path to a file containing a table tree. You can use this argument instead of [NEW_TABLE]. The table tree file contains the name of the new table in 1010data Insights Platform, as well as metadata about the new table. See Table tree for more information.

[FILE_NAME] or @[SPEC_TREE_FILE]
[FILE_NAME] is the complete path to the flat file to load into 1010data Insights Platform.

@[SPEC_TREE_FILE] is the path to an XML spec tree. You can use this argument instead of [FILE_NAME]. The spec tree contains the file name of the flat file, as well as metadata of the source data, such as record and field separators. See Spec tree for more information.