Skip to main content

Upload Files to database

We can still create datasets, charts, and dashboards from CSV files before connecting databases.

Connect a Database and Enable Uploads

In order for the database to accept the CSV, you need to enable data uploads. Data uploads will be enabled by default. If data uploading is disabled, follow the below steps.

  • Start by navigating to the Connectors.
  • Then select the Edit pencil icon for your database.
  • The "Edit database" panel appears. Select the Advanced tab and then expand the Security panel.
  • In the Schemas Allowed for CSV Upload field, enter the name(s) of any schemas in your database that should be available for CSV data uploads. If more than one, separate each by a comma.
  • In the Allow data upload field, select the checkbox.
Allow file uploads to database
Allow file uploads to database
  • If there are specific schemas to house the CSV upload, specify those schemas in the text box shown.
  • Lastly, select Finish.

To confirm, in the Databases screen under the "CSV upload" column header, ensure that a checkmark is displayed for your database row entry.

CSV Upload enable
CSV Upload enable

Different File upload Options

Navigate to the Connectors section, where you'll see the option Upload files to database at the top. Click on it to reveal a dropdown menu with the following options:


  • Upload CSV : Select this option to upload a CSV (Comma-Separated Values) file, which is commonly used for storing and transferring data in a tabular format. This option is ideal for simple text-based data files.
  • Upload Columnar File : Choose this option to upload a columnar file, which stores data in columns rather than rows. This format is typically used for large datasets and is optimized for analytical queries, improving performance in data processing.
  • Upload Excel File : Use this option to upload an Excel file (.xls or .xlsx), a widely-used spreadsheet format that supports complex data structures, formulas, and multiple sheets within a single file. This is suitable for data that requires organization beyond simple text or numerical values.

Upload CSV

Configuration for uploading CSV File
Configuration for uploading CSV File

CSV to Database Configuration

PropertyDescription
CSV UploadSelect the CSV file from your local or network system by clicking "Choose File".
Table NameEnter a meaningful name for the table that will be created from the CSV data.
DatabaseChoose the database where the CSV data will be stored.
SchemaSelect the schema associated with the chosen database.
DelimiterSpecify the symbol used to separate data fields in the CSV file. Use \s+ for whitespace delimiters.

Additional CSV Configurations

PropertyDescription
Table Already ExistsDetermine the action if the table already exists:
Fail: Take no action.
Replace: Drop and recreate the table.
Append: Insert data into the existing table.
Skip Initial SpaceEnable this option to ignore spaces following the delimiter.
Skip Blank LinesEnable this option to skip blank lines in the CSV file, preventing them from being treated as NaN values.
Columns to be Parsed as DatesList the columns that should be parsed as dates, separated by commas.
Interpret Datetime Format AutomaticallyEnable this option to allow Pandas to automatically interpret datetime formats.
Decimal CharacterSpecify the character to be used as the decimal point in the CSV data.
Index ColumnDefine a column to be used as the row index for the data frame. Leave it empty if no index column is required.
Mangle Duplicate ColumnsEnable this option to rename duplicate columns automatically as "X.0, X.1", etc.
Null ValuesProvide a list of values in JSON format that should be treated as null.

Column Settings

PropertyDescription
Dataframe IndexChoose whether to write the dataframe index as a separate column.
Column Label(s)Specify labels for index columns. If left blank and Dataframe Index is enabled, the index names will be used as labels.

Row Settings

PropertyDescription
Header RowEnter 0 if your CSV file includes a header row. Leave it empty if there is no header row.
Rows to ReadSpecify the number of rows to read from the CSV file.
Skip RowsIndicate the number of rows to skip at the beginning of the file.

Once you have configured all the settings, click Save.

Upload Columnar File

Configuration for uploading Columnar File
Configuration for uploading Columnar File
PropertyDescription
Table NameEnter a name for the table to be created from the columnar data. This name should be unique and memorable.
Columnar FileClick "Choose Files" to upload one or more columnar files from your local or network system. These files will be used to populate the table in the database.
DatabaseSelect the database where the table will be created and the columnar data will be stored.
SchemaChoose the schema associated with the selected database, if applicable. Schemas help organize and separate database objects such as tables.
Table ExistsDecide what to do if the table already exists:
Fail: Take no action if the table exists.
Replace: Drop and recreate the table.
Append: Add data to the existing table.
Use ColumnsEnter a JSON list of the specific column names that should be read from the file. If left as null, all columns will be read.
Dataframe IndexCheck this box to write the dataframe index as a separate column in the table. This is useful if the index needs to be preserved as part of the data.
Column Label(s)Provide a label for the index column(s). If Dataframe Index is enabled and no label is provided, the index names will be used as labels.

After configuring these settings, click Save to create the table and upload the columnar data to the selected database.

Upload Excel file

Configuration for uploading Excel File
Configuration for uploading Excel File
PropertyDescription
Table NameEnter a name for the table to be created from the Excel data. This name should be unique and descriptive.
Excel FileClick "Choose File" to upload the Excel file from your local or network system. This file will be used to populate the table in the database.
Sheet NameSpecify the name of the sheet from which data will be imported. If left empty, the first sheet in the Excel file will be used by default.
DatabaseSelect the database where the table will be created and the Excel data will be stored.
SchemaChoose the schema associated with the selected database, if applicable. Schemas help organize and separate database objects such as tables.
Table ExistsDecide what to do if the table already exists:
Fail: Take no action if the table exists.
Replace: Drop and recreate the table.
Append: Add data to the existing table.
Header RowEnter 0 if your Excel file includes a header row. If there is no header row, leave this field empty.
Index ColumnSpecify a column to be used as the row index for the data frame. Leave it empty if no index column is needed.
Skip RowsIndicate the number of rows to skip at the start of the file.
Rows to ReadSpecify the number of rows to read from the Excel file.
Parse DatesEnter a comma-separated list of columns that should be parsed as dates.
Decimal CharacterSpecify the character to be used as the decimal point in the Excel data.
Dataframe IndexCheck this box to write the dataframe index as a separate column in the table. This is useful if the index needs to be preserved as part of the data.
Column Label(s)Provide a label for the index column(s). If Dataframe Index is enabled and no label is provided, the index names will be used as labels.
Null ValuesEnter a JSON list of values that should be treated as null. For example, ["", "None", "NaN"]. Hive databases only support a single null value, so use [""] for empty strings.

After configuring these settings, click Save to create the table and upload the Excel data to the selected database.