Load Data from Local File
Copy and paste tutorial for loading data from a local file on your computer
Copy and paste tutorial for loading data from a local file on your computer
To load data from your local computer, you can:
Download the appropriate version of KiSQL for your instance of Kinetica.
Run KiSQL from the CLI and connect to Kinetica:
|
|
Next, create a directory in KiFS using the CREATE DIRECTORY command:
|
|
Then, upload your file(s) to KiFS using the UPLOAD FILE command:
|
|
To initiate the ingest of data into a Kinetica table, use the LOAD INTO command for a one-time batch load. To reference files in KiFS, you can use a URL that looks like this:
kifs://<folder_name>/<filename>.<extension>
|
|
The following are some common options used when loading. For the full list of options, see LOAD INTO. For copy/paste examples of many of the options, see Loading Data.
Kinetica has two different error handling modes for dealing with erroneous data. To halt ingestion after a bad record is found, use the ABORT mode. To skip erroneous records and continue the ingest, use the SKIP mode.
To inspect erroneous records, you may use the BAD RECORD TABLE NAME option. All bad records encountered will be stored there for review. The bad records table is limited to 10,000 records by default and may be overridden using the BAD RECORD TABLE LIMIT option.
|
|
|
|
In some cases, you may only want to store certain columns from your source data. Use the FIELDS MAPPED BY NAME(...) option, which allows you to specify the desired fields to store in Kinetica.
|
|
Use the COLUMN FORMATS option to format date and time fields into Kinetica Date, Time, and DateTime columns. Time formats are specified using a JSON formatted string. Non-placeholder characters must be wrapped in quotes, which must also be escaped (e.g. '{"dt": {"date": "\"(\"YYYY\")\" Mon, DD"}}'). Alternatively, you can use the ? character as a wildcard character. Note that Kinetica does not handle or store timezones and they will be discarded. See the full list of supported date and time format codes.
|
|
|
|
|
|