# Catalog API by Path weird behaviour with Id

**URL:** https://community.dremio.com/t/catalog-api-by-path-weird-behaviour-with-id/2909
**Category:** Uncategorized
**Created:** [March 6, 2019, 11:39am UTC](https://community.dremio.com/t/catalog-api-by-path-weird-behaviour-with-id/2909 "2019-03-06T11:39:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dfleckinger](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dfleckinger/32/370_2.png) [@dfleckinger](https://community.dremio.com/u/dfleckinger)
#### Post date: [March 6, 2019, 11:39am UTC](https://community.dremio.com/t/catalog-api-by-path-weird-behaviour-with-id/2909/1 "2019-03-06T11:39:37Z")

</div>

Hi,  
i’m playing with the Catalog API to promote/delete parquet datasets.

In the $scratch directory, I’ve promoted a test folder to dataset, then removed the dataset using the API.  
Folder name is test.

When calling the API endpoint /api/v3/catalog/by-path/, I get different id in response depending on the fact that I put quotes around folder name

with **‘$scratch/“test”’** (with double quotes)  
{u’children’: [{u’id’: u’dremio:/$scratch/test/“1\_0\_0.parquet”’,  
u’path’: [u’$scratch’, u’test’, u’“1\_0\_0.parquet”’],  
u’type’: u’FILE’}],  
u’entityType’: u’folder’,  
**u’id’: u’dremio:/$scratch/“test”’,**  
u’path’: [u’$scratch’, u’“test”’]}

with **‘$scratch/test’** (without double quotes)  
{u’children’: [{u’id’: u’dremio:/$scratch/test/“1\_0\_0.parquet”’,  
u’path’: [u’$scratch’, u’test’, u’“1\_0\_0.parquet”’],  
u’type’: u’FILE’}],  
u’entityType’: u’folder’,  
**u’id’: u’2cf9a662-8905-4abc-b0ad-2b872776eca1’,**  
u’path’: [u’$scratch’, u’test’],  
u’tag’: u’0’}

Does it mean we should always use double quotes around folder names when querying catalog by paths ?  
The first id returned works when I try to promote it as a dataset, but the second id does not enable to promote the dataset.

Documentation ([https://docs.dremio.com/rest-api/catalog/get-catalog-path.html](https://docs.dremio.com/rest-api/catalog/get-catalog-path.html)) does not provide information whether we should use quotes or not.

---

<div class="post-metadata">

### Author: ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)
#### Post date: [March 6, 2019, 4:56pm UTC](https://community.dremio.com/t/catalog-api-by-path-weird-behaviour-with-id/2909/2 "2019-03-06T16:56:48Z")

</div>

@dfleckinger

Both should work (as they are treated as equivalent) but we have a bug for the 2nd case that is targeted for our next major release. The bug affects re-promotion - the initial promotion will work but any re-promotion will fail unless you use the quoted path. Hopefully that is a good enough workaround until we fix the issue.

---

<div class="post-metadata">

### Author: ![dfleckinger](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dfleckinger/32/370_2.png) [@dfleckinger](https://community.dremio.com/u/dfleckinger)
#### Post date: [March 7, 2019, 8:37am UTC](https://community.dremio.com/t/catalog-api-by-path-weird-behaviour-with-id/2909/3 "2019-03-07T08:37:27Z")

</div>

Good to know. Thanks
