Hi,
I am using dremio rest api for creation of datasets.
I am able to create a dataset in a path successfully. But when i edit the dataset, the edited query is updated in dataset but the fields returned by the dataset is not updated.
After creation of dataset i retrieved the dataset below:
endpoint used : http://localhost:9047/api/v3/catalog/171d0dc2-ce4a-417b-8cb8-0c2b5a679d6a
{
“entityType”: “dataset”,
“id”: “171d0dc2-ce4a-417b-8cb8-0c2b5a679d6a”,
“type”: “VIRTUAL_DATASET”,
“path”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”,
“5b99f18316209a2b2cf8e945”
],
“createdAt”: “2018-09-09T03:36:49.688Z”,
“tag”: “1”,
“sql”: “select * from “5b99012916209a090491569e”.“dizer”.“tenants””,
“sqlContext”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”
],
“fields”: [
{
“name”: “_id”,
“type”: {
“name”: “VARBINARY”
}
},
{
“name”: “tenant_id”,
“type”: {
“name”: “VARCHAR”
}
}
]
}
When i try to update the query for the dataset, i am not getting the desired fields for the changed query.
PUT endpoint: http://localhost:9047/api/v3/catalog/171d0dc2-ce4a-417b-8cb8-0c2b5a679d6a
PUT request:
{
“entityType”: “dataset”,
“id”: “171d0dc2-ce4a-417b-8cb8-0c2b5a679d6a”,
“tag”: “1”,
“type”: “VIRTUAL_DATASET”,
“path”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”,
“5b99f18316209a2b2cf8e945”
],
“createdAt”: “2018-09-09T03:33:55.307Z”,
“sql”: “select * from “5b99012916209a090491569e”.“dizer”.“rules””, ##updated query
“sqlContext”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”
]
}
PUT Response:
{
“entityType”: “dataset”,
“id”: “171d0dc2-ce4a-417b-8cb8-0c2b5a679d6a”,
“type”: “VIRTUAL_DATASET”,
“path”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”,
“5b99f18316209a2b2cf8e945”
],
“createdAt”: “2018-09-09T03:33:55.307Z”,
“tag”: “2”,
“sql”: “select * from “5b99012916209a090491569e”.“dizer”.“rules””, ##query got updated
“sqlContext”: [
“5b99012916209a090491569e_5b93594916209a261cd374cd”
],
“fields”: [ ##fields are not updated
{
“name”: “_id”,
“type”: {
“name”: “VARBINARY”
}
},
{
“name”: “tenant_id”,
“type”: {
“name”: “VARCHAR”
}
}
]
}
The fields are not getting updated.
Can you help me this? Your earliest reply will help me a lot! Thanks in advance!