Data types
ThoughtSpot supports all the common data types. Before you import data, compare the data types you want to load from the source with the ones we support. Then, convert your data before loading it. Typically, you would export the data, transform it to meet these type rules, and then load the data. This is known as an extract-transform-load process.
Supported data types
The tables you create to receive the data must have the same number of columns and data types as the data you will be loading. Choose a data type for each column from the list of supported data types:
- Character or Text
-
VARCHAR(n)Specify the maximum number of characters, as in
VARCHAR(255).The size limit is 64MB for
VARCHARvalues.If you have VARCHARdata that exceeds the 64MB limit, the entire load fails.
- Floating point or Decimal
-
DOUBLEorFLOATWe recommend that you use
DOUBLE, because it has a range of 15 significant digits,1.7E +/- 308.FLOAThas a range of 7 significant digits,3.4E +/- 38.
- Boolean
-
BOOLCan be
trueorfalse.
- Integer
-
INTorBIGINTINTholds 32 bits. It has a range of-2,147,483,648to2,147,483,647.BIGINTholds 64 bits. It has a range of-9,223,372,036,854,775,808to9,223,372,036,854,775,807.
- Date or time
-
DATE,DATETIME,TIMESTAMP, orTIMEThoughtSpot stores
DATETIME,TIMESTAMP, andTIMEat the granularity of seconds.TIMESTAMPis identical toDATETIME; we include it for syntax compatibility.
Geographical data types
ThoughtSpot supports geographical data.
How to import geographical data
Import your geographical data as text values. This ensures that the data defaults to the correct configuration, where the data type is VARCHAR.
You can use DOUBLE or VARCHAR for latitude and longitude data. See the following example:
Here, the zipcodes were imported as text values. By default, the data type is VARCHAR, the column type is attribute, and additive is no.
|
Latitude and longitude
For latitude and longitude, you can use either VARCHAR or DOUBLE.
Latitude and longitude data must be in the form of positive and negative numbers, most commonly decimals, NOT in degree / minute / second notation. North of the Equator, latitude values are positive, and south of the Equator, latitude values are negative. East of the Prime Meridian, longitude values are positive, and West of the Prime Meridian, longitude values are negative. |
|
Designate geographical data
After loading the data, designate it as a geographical data type when you Edit the system-wide data model.
|
These data types can be designated as geographical data, which enables them to be visualized using the Geo chart types:
-
Sub-nation region, such as State, County, Zip Code, Province, Prefecture, District, and so on.
- Country
-
Countries, such as United States:
long nameUnited States
name_sortUnited States of America
abbreviationU.S.A.
adm0_a3USA
adm0_a3_isUSA
adm0_a3_usUSA
adminUnited States of America
brk_a3USA
brk_nameUnited States
formal_enUnited States of America
iso_a2US
iso_a3USA
iso_n3840
- Sub-nation region
-
Regions could be Countries, States, districts, zipcodes, postal codes, provinces (for example, in Canada), prefectures (in Japan), and so on.
- Counties
-
Here are some examples of Counties:
-
santa clara county
-
pike county, ohio
-
pike county, OH
-
- States / Provinces
-
Here are some examples of States and Provinces:
-
name: California -
US Postal Service abbreviation: CA
-
- Zip codes
-
Here are some examples of zip codes in the United States:
-
po_name: MT MEADOWS AREA -
ZIP: "00012" -
zip2: 12
-
- Other
-
Here are some examples of other Sub-nation regions found in countries other than the United States:
-
bremen
-
normandy
-
west midlands
-
- Latitude
-
Review the information for specifying Latitude and longitude.
Here are some examples of Latitude, which you must use with Longitude:
-
37.421023
-
-1.282911
-
- Longitude
-
Review the information for specifying Latitude and longitude.
Here are some examples of Longitude, which you must use with Latitude:
-
122.142103
-
-103.848865
-