tsload flag reference
You can modify the behavior of tsload with flags.
For recurring data loads and for scripting loads, use tsload
(the ThoughtSpot Loader).
This reference section lists all the flags that can be used to modify the behavior of tsload
.
General tsload flags
Flag | Description | Notes |
---|---|---|
|
Specifies the pre-existing target database into which tsload should load the data. |
|
|
Specifies the target schema. |
Default is “falcon_default_schema”. |
|
Specifies the tables that you want to load into the database. |
The tables must exist in the database specified by |
|
Specifies that any data in the target table is to be removed before the new data is loaded. |
If supplied, any rows that exist in the table specified by --target_database and --target table will be deleted before this data load. To perform an “upsert” on the existing data, omit this flag or specify |
|
Specifies the maximum number of rows that can be ignored if they fail to load. |
If the number of ignored rows exceeds this limit, the load will be aborted. |
|
Specifies the file to use for storing rows that failed to load. |
Input rows that do not conform to the defined schema in ThoughtSpot will be ignored and inserted into this file. |
|
Specifies the format string for date values. |
The default format is yearmonthday e.g. “Dec 30th, 2001” and is represented as 20011230. Use the date format specifications supported in the strptime library function. |
|
Specifies the format string for datetime values. |
The default is yearmonthday hour:minute:second e.g. Dec 30th, 2001 1:15:12 and is represented as 20011230 01:15:12. Use the datetime format specifications supported in the strptime library function. |
|
Specifies the format string for time values. |
The default is hour:minute:second. Use the time format specifications supported in the strptime library function. |
--v=[0|1|2|3 |
Specifies the verbosity of log messages. |
Provide a value for verbosity level. By default, verbosity is set to the minimum, which is 0. This value is similar to a volume control. At higher levels your log receives more messages and that log more frequently. This is used for debugging. You should not change this value unless instructed by ThoughtSpot Support. |
|
Skips fractional seconds when loading data. |
If supplied, the upserts logic may be affected, especially if the date time being loaded is a primary key, and the data has millisecond granularity. Load the data twice, first time as a string with a primary key, and again with second granularity date time. There is no support to store fractional seconds in the ThoughtSpot system. |
File loading tsload flags
The following flags are used when loading data from an input file:
Flag | Description | Notes |
---|---|---|
|
Specifies the location of the file to be loaded. |
|
|
Specifies the data file format. |
Optional. The default is csv. |
|
Specifies the field delimiter used in the input file. |
|
|
Specifies that the field separator appears after every field, including the last field per row. |
Example row with trailing field separator: a,b,c,The default is false. |
|
Specifies how null values are represented in the input file. |
These values will be converted to NULL upon loading. |
|
Specifies whether the “date” or “datetime” values in the input file are represented as epoch values. |
|
|
Specifies the format in which boolean values are represented in the input file. |
The default is T_F. You can also use this flag to specify other values. For example, if your data used Y for true and NULL for false, you could specify: |
|
Specifies the filepath that describes the formats for the columns you are importing. |
The format file must be in |
|
Indicates that the input file contains a header row. |
If supplied, column names in the header row are used to match column names in the target table in ThoughtSpot. If not supplied, the first row of the file is loaded as data, the same as all subsequent rows. |
|
Specifies the escape character used in the input file. |
If no value is specified, the default is “(double quotes). |
|
Specifies the enclosing character used in the input file. |
If the enclosing character is double quotes, you need to escape it, as in this example: --enclosing_character "\"" |
|
Specifies how boolean values are represented in the input file. |
If supplied, the input CSV file uses a bit for boolean values, i.e. the false value is represented as 0x0 and true as 0x1. If omitted or set to false, boolean values are assumed to be T_F, unless you specify something else using the |