Preview the data source when created¶
Before creating the knowledge base, preview the number of files and data tables to be selected based on the Catalog selection range. This interface is read-only and does not create a knowledge base, data source or processing task.
POST $CLOUDSIGMA_API_BASE/semantic-models/source-selections/preview
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
The selection range only supports Catalog data: database_tables is used for data tables in a Database, and volume_files is used for files in a Volume. When all_selected: false, the corresponding selected_table_ids or selected_file_ids must be passed. When all_selected: true, the corresponding exclusion ID can be passed.
Request parameters¶
curl -X POST "$CLOUDSIGMA_API_BASE/semantic-models/source-selections/preview" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"source_selections": [
{
"kind": "database_tables",
"database_id": 101,
"all_selected": false,
"selected_table_ids": [201]
}
]
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
array of object |
Yes |
Source selection to preview. |
|
string |
Yes |
|
|
integer |
Conditional |
Catalog Database ID of |
|
integer |
Conditional |
Catalog Volume ID of |
|
boolean |
Yes |
|
|
integer (integer array) |
Conditional |
When |
|
array of string |
Conditional |
When |
|
integer (integer array) |
No |
Catalog table IDs to exclude when selecting all. |
|
array of string |
No |
Catalog file IDs to exclude when selecting all. |
|
object |
No |
Filter further by table name, file name or extension. |
|
string |
No |
Table name filter conditions. |
|
string |
No |
File name filter conditions. |
|
array of string |
No |
File extension filter. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"file_count": 0,
"table_count": 1,
"total_count": 1
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
integer |
The number of files in the preview range. |
|
integer |
The number of data tables in the preview range. |
|
integer |
The total quantity after deduplication. |