This is an example of using the inspect API, and then filtering the response to only the columns for the data source. This is useful to programmatically detect schema changes.
curl "https://<YOUR API ENDPOINT>/inspection/input/inspect/<YOUR DATA SOURCE ID>/" \
-H 'Content-Type: application/json' \
-H 'Authorization: <YOUR API KEY>' \
|jq '[.fields[]]'
This will return an array of objects like the following
{
"name": "data.a",
"nativeType": {
"name": "string",
"isArray": false,
"subFields": []
}
}
name | Column Name |
nativeType.name | Data Type (string, numeric, time) |
nativeType.isArray | If the field is an array |
nativeType.subFields | Array of fields if the data is nested |
Comments
0 comments
Please sign in to leave a comment.