CSV File

Local CSV file that you can query against

Local CSV FIle Overview

The CSV File connector will load a CSV file into a local SQLite database that can be visualized.

See the SQLiteconnector for details about querying SQLite for visualizations.

Column Headers

The first row of the CSV is considered as headers for the columns. Ensure that your CSV has column headers.

Column Data Types

The CSV data will be automatically inspected and the appropriate data type selected. All of the data in a column must resolve to the same type, or it will be considered a string.

The data types are checked in order of the following. If a Datetime, Date or Numeric is not found, the type will be string

  1. Datetime

  2. Date

  3. Numeric

    1. Will also check for 'numberish' values (see Numberish Values below)

  4. String

    1. If maximum length < 255, then data type will be VARCHAR with the length being the maximum length found

Numberish Values

Many common real world number notations will be converted to numbers during import.

  • Negative parenthesis like (150) will be converted to -150

  • Scientific notation like 10^2 will be converted to 100

  • Thousands notation like 7.5k will be converted to 7500

All number conversions are based on US/English comma/decimal standard. For example, international 1.200,5 will get converted to 1.2005 instead of 1200.5. As such, do not currently detect commas as decimal separators.

A full example list of conversions is described below:

Externally Connecting to the SQLite Database

You may wish to connect to the imported CSV with another database browser like DBeaver. You can find the sqlite file in:

./{{home}}/ChartSQL/{{installPath}}/db/csvfile/{{datasourceName}}/data.sqlite

Where as:

  • {{home}} is your system user data directory

  • {{installPath}} is the location of your ChartSQL Studio Installation

  • {{datasourceName}} is the name of your configured CSV Datasource

Last updated

Support

DiscordX

ChartSQL