Set column name, description, and type
When you model your data, you set basic information for data columns, such as a column’s NAME, DESCRIPTION, and TYPE. All of these can influence how a user experiences your data. For example, the DESCRIPTION appears as a "tip" when you click the knowledge card button (new Answer data panel), or hover over a column (classic Answer data panel). This helps you to understand where the data you are searching comes from.
Data modeling from the UI
To model your data columns from the ThoughtSpot UI, follow these steps:
-
Navigate to the Data tab from the top navigation bar.
-
Select the data source that you would like to update.
-
Select Edit Worksheet in the upper-right corner of the screen.
-
Update your data columns.
Change the column name
The Column Name (UI)/ ColumnName (model file) parameter is the name users type to add a column to their search. Change these column names in ThoughtSpot to make them more meaningful to users.
The model file contains a row for each column in your data set. It isn’t unusual to have tens of thousand of rows in this file. You can change all or a subset of rows. You can edit the file to leave the heading rows and only those rows you want to change. This can make the file more convenient to work with.
The default column name is the name you gave the column when you defined the table in the database or (Free Trial only) imported the CSV file from the browser.
To update the column name, follow these steps:
-
Find the column name you want to change, either on the ThoughtSpot application or in the model file.
-
Type in the new column name.
-
Save your changes.
If any of your column names or values contain leading or trailing whitespaces, you must remove these spaces before and after column names and values when loading or modeling data.
The ThoughtSpot search bar does not accept column names or values with leading or trailing whitespaces.
If you must keep these spaces, tell your users to add a delimiter for the search bar to accept them.
For example, if you have a column named Sales , with a space before and after the word Sales, you must enter it in the search bar as ' Sales ' , with single quotes surrounding the name.
Otherwise, ThoughtSpot automatically removes the extra spaces and does not recognize the column name.
|
Change column description
The Description (UI)/ ColumnDescription (model file) parameter is an optional description for a column. You can provide a description for a specific column, to provide additional information for users about the data it contains. When a user hovers over the column, a tooltip will show this description.
To create a column description:
-
Find the column description you want to change, either on the ThoughtSpot application or in the model file.
-
Enter a new description.
-
Save your changes.
Change column type
The Column Type (UI)/ ColumnType (model file) parameter describes the kind of data a column stores. This is set automatically upon defining the table, but in some cases, you may want to change the type. There are two types of columns:
-
ATTRIBUTE
contains a characteristic or trait associated with your data, such asname
,address
, orid number
. -
MEASURE
contains a numeric value that can be compared in a meaningful way using math, such as a count or measurement, likesales
.
When you create a new table, the default column type is set according to the Data Type defined for each column.
By default, columns with numeric data types (FLOAT
, DOUBLE
, INT
, or BIGINT
) are assigned the type MEASURE
.
Columns with VARCHAR
, BOOL
, or date/time data types are assigned the type ATTRIBUTE
.
Usually the default setting for column type works fine.
But occasionally, you must change a MEASURE
to an ATTRIBUTE
.
Examples of numeric values for which mathematical operations are not meaningful include:
-
ID numbers
-
Key values that are primarily used for joining tables
-
Product number or SKU
-
Sports team member jersey number
-
Year, when separate from a date (for example, 1999, 2000)
-
Zip codes
These values are numbers, but you would not do math on them. For example, it is not meaningful to add two zip codes together.
To change the column type:
-
Find the column type you want to change, either on the ThoughtSpot application, or in the model file.
-
Change it to either
MEASURE
orATTRIBUTE
. -
Save your changes.
You cannot change a column with data type VARCHAR to column type MEASURE . ThoughtSpot allows conversion of numeric fields to attributes, but does not allow conversion of text-based fields to measures.
|
Related information