chris k - Hi team, since Fetch Liveboard Report...
Hi team, since Fetch Liveboard Report API doesn't support exporting multiple table answers in tabular formats, we have implemented a logic to use Fetch Liveboard Data API instead and fetch data multiple table answers. However, these data don't have any formatting done on dates and datetimes, so we are receiving pure unix timestamps. Is there a way to configure in the request to change exported format of the timestamps? If not, can you give suggestions on how we could identify whether a certain column is date/datetime or not? We cannot simply assume that integers with certain digits will be timestamps, because we are using similar format for non-date columns.
6 Replies
Can you try this api https://developers.thoughtspot.com/docs/connections-api#fetchLiveColums
Data connection APIs
The connection API endpoints allow you to query data connections used for live query services on a ThoughtSpot instance
Looks like the endpoint supports direct fetch of data from data connections, but what I want to achieve is exporting liveboard's visualizations' tabular data, which already have all data filters applied. Not sure how the above API can help.
@Swarnika can you take a look?
hey @ketchup : Can you try using any of the below API's whichever helps..
POST /api/rest/2.0/metadata/answer/data
POST /api/rest/2.0/metadata/liveboard/data
I am using those apis and running into the issue 😦
@ketchup I think you will need to run multiple apis everytime you fetch data, one the data pai and then the metadata api to see the datatypes of the suspected columns.
Also the ask to get date format in a specifc format makes sense, I would recommend to create a feature request to get this
Another thing I see is that you get column name like Month(column name), where "Month" represents the granularity of the date columns, does that not help in identifying which column is month?
So basically you are looking for fetching the Data as well Type information associated with data columns..
Pls check if below suggestion helps.
1. For fetching the Data
You can use "POST /api/rest/2.0/metadata/answer/data", "POST /api/rest/2.0/metadata/liveboard/data"
2. For getting type information associated with column type, you can use "POST /api/rest/2.0/metadata/tml/export" on undelying Data Model or Worksheet. And once you have exported data, you can look for below structure where in for each column you wil have data_type. For example:
- name: Release Date
db_column_name: Release Date
properties:
column_type: ATTRIBUTE
format_pattern: MM/dd/yyyy
db_column_properties:
data_type: DATE