Import table data
You can use a wizard in the Table Definition tool to import table data to a new table or an existing table.
Choose one of the following depending on your use case:
-
Import table data to a new table
-
Import table data to an existing table
Prerequisites
-
If you want to import table data to an existing table:
-
you have an existing table configured from the Table Definition tool
-
your CSV file has headers, as a set table structure is imported to a table with a predefined table definition.
-
Procedure
Import table data to a new table
-
Select Import and select New in the dialog that opens.
-
In Name, enter a name for the new table.
-
In ID format: choose between UUID or Incremental ID and select Next.
Result: The Import wizard opens at the Data Type step.
-
In the Data Type step, select between the data types CSV, Planet9 file, and JSON, and select Next to go to the Upload step.
-
If you select CSV, in the Upload step, do the following:
-
Browse for a CSV file on your computer.
-
In Data Separator, select between Automatically detect delimiter (default), . (Comma), ; (SemiColon), | (Pipe).
-
If the CSV file has a header row, select CSV file has header row.
-
If you want to import table data IDs, select Import id.
-
Select Next.
-
-
If you select Planet9 file, In the Upload step, do the following:
-
Browse for a Planet9 file on your computer, by selecting Upload.
-
Select Next.
-
-
If you select JSON, in the Upload step, do the following:
-
Paste your JSON code into the wizard.
-
Select Next.
-
-
-
In the Table Schema step, configure the columns of table data to be imported according to fixed schema properties. The table schema has the following schema properties to configure:
- Name
-
Contains the name of column during import. If the table data has headers, the headers are automatically inserted in Name.
- Description
-
Contains a description for the column.
- Default value
-
Contains a default value for the column. Type: Contains following value types for the value contained in the row of a table:
-
Text
-
UUID
-
Boolean
-
Smallint
-
Integer
-
Bigint
-
Smalltext
-
Mediumtext
-
Timestamp with Time Zone
-
Timestamp without Time Zone
-
JSON
-
- Options
-
If in Type, you select the value type Decimal, in the Precision field, you can enter a precision value (the number of digits before and after a decimal place), and in the Scale field, you can enter a scale value (the number of digits after a decimal place).
- Unique
-
Select the checkbox if all column data is unique and does not contain duplicates.
- Nullable
-
Select the checkbox if the column data can contain NULL values. You can also delete a column in this step.
-
Select Next.
Result: A message appears in the Review step, informing that the table was successfully created on the basis of the table schema configured in the Table Schema step and the total number of entries the imported file contains.
-
Select Next.
Result: The Data step opens.
-
In the Data step, you can modify cells of columns and rows with free-text changes, if necessary.
-
Select Import.
Result: The Import Data step opens and a message appears, informing that the table data was successfully imported.
-
Select Complete.
Import table data to an existing table
-
Select Import and select Existing in the dialog that opens.
-
In Use Existing Table, select an existing table from the Table dialog.
-
To delete all rows from the existing table before uploading data, select Delete all rows from table before uploading data.
You cannot undo the deletion of rows from an existing table when importing new table data. Result: The Import wizard opens at the Data Type step.
-
In the Data Type step, select between the data types CSV and JSON, and select Next to go to the Upload step.
-
If you select CSV, in the Upload step, do the following:
-
Browse for a CSV file on your computer.
-
In Data Separator, select between Automatically detect delimiter (default), . (Comma), ; (SemiColon), | (Pipe).
-
If the CSV file has a header row, select CSV file has header row.
-
If you want to import table data IDs, select Import id.
-
Select Next.
-
-
If you select JSON, in the Upload step, do the following:
-
Paste your JSON code into the wizard.
-
Select Next.
-
Result: The Data step opens.
-
-
In the Data step, you can modify cells of columns and rows with free-text changes, if necessary.
-
Select Import.
Result: The Import Data step opens and a message appears, informing that the table data was successfully imported.
-
Select Complete.
Results
-
You have imported table data using the Import wizard, by creating a new table or importing table data to an existing table.