Proximity searches "near" and "farther than
If your table contains Latitude and Longitude data, you can use proximity searches that find entities related to each other by location.
|You can only use this feature if you bring your data into ThoughtSpot’s in-memory database. You cannot perform proximity searches if you connect to your data in an external database.|
Proximity keywords allow you to search for data on locations
farther than n number of miles from a specified location.
For example, you could search for
store county near santa clara county within 50 miles, or
store city farther than 50 miles from santa clara county.
Note that you can only use the
farther than keywords on data sources that have
The latitude and longitude columns must be configured as geographical data.
farther than keyword
Proximity search syntax
There are two proximity search keywords:
Here is the syntax for these keywords:
<column> near <location>
store city near tokyo
<column> near <location> within <n> (miles | km | meters)
store city near tokyo within 50 miles
<column> farther than <n> (miles | km | meters) from <location>
store city farther than 50 miles from tokyo
Store city in these examples refers to the name of the column that
tokyo falls under in the data.
You must specify the name of the column for the location you are searching on before entering the
farther than keyword.
How proximity search works
ThoughtSpot calculates the distance from the location you specify in a proximity search as a straight-line distance (not road distance) radius, using miles, kilometers, or meters from the central point. If you do not specify a distance, the system uses 10 km as the default.
To increase the 10 km default, contact ThoughtSpot Support.
Given a location and an optional distance, the search returns all instances of a geotype column that fall within the parameters.
For example, for the
near santa clara county search shown above, the system searches for rows with
santa clara county in it and finds the corresponding latitude and longitude columns.
The system can handle up to 30 latitude/ longitude pairs for a given geographical value, like a city, country, or county.
Then, ThoughtSpot finds all latitude/ longitude pairs with a direct distance of less than 10 km or a specified distance from the
santa clara county latitude/ longitude pairs.
To increase the maximum number of latitude/ longitude pairs that can be associated with a given geographical value, contact ThoughtSpot Support.
You can add any additional filtering to your query.
Proximity search configuration requirements
You must use a single data source, like a table, Worksheet, or View, to run a proximity search. You cannot search on two different tables, related by a join, like you can in a typical ThoughtSpot search. To search on two (or more) different tables, create a Worksheet that contains data from those tables and use the Worksheet as your data source.
Your data source must contain a column of type
longitudeand a column of type
Your administrators must configure the latitude and longitude columns using the appropriate GeoType.
Your administrators must enable this feature. If you are having trouble using proximity search, and all other configuration requirements are met, the feature may be turned off. Ask your administrator to contact ThoughtSpot Support to turn the feature on.