# Empty folder when using 'dedup\_coords'

**URL:** <https://forum.tiledb.com/t/empty-folder-when-using-dedup-coords/264>\
**Category:** Uncategorized\
**Created:** [November 3, 2020, 11:39am UTC](https://forum.tiledb.com/t/empty-folder-when-using-dedup-coords/264 "2020-11-03T11:39:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mtrl\_Scientist](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/mtrl_scientist/32/134_2.png) [@Mtrl\_Scientist](https://forum.tiledb.com/u/Mtrl_Scientist)\
**Post date:** [November 3, 2020, 11:39am UTC](https://forum.tiledb.com/t/empty-folder-when-using-dedup-coords/264/1 "2020-11-03T11:39:59Z")

</div>

Hi,

I have an array that throws an error saying there are duplicate coords when trying to consolidate & vacuum (no error when reading/writing). So, I added the dedup\_coords option via config:

```
config = tiledb.Config()

config = tiledb.Config({
    "sm.tile_cache_size":str(5_000_000),
    "sm.consolidation.step_min_frags":"2",
    "sm.consolidation.step_max_frags":"20",
    "sm.consolidation.steps":"20",
    "sm.consolidation.buffer_size":str(5_000_000),
    "sm.consolidation.step_size_ratio": "0.002",
    "sm.dedup_coords":'true'
})

ctx = tiledb.Ctx(config)
            
tiledb.consolidate('arr',ctx=ctx)
tiledb.vacuum('arr',config=config)

```

When I do that, the consolidation process works. However, now a lot of empty folders are created. Is this a bug? Is it safe to delete empty folders without corrupting the array?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/tiledb/original/1X/c6c0d774895ee7a171fefd45462125b26ee5e511.png)

---

<div class="post-metadata">

**Author:** ![stavros](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@stavros](https://forum.tiledb.com/u/stavros)\
**Post date:** [November 3, 2020, 3:42pm UTC](https://forum.tiledb.com/t/empty-folder-when-using-dedup-coords/264/2 "2020-11-03T15:42:00Z")

</div>

Were the empty folders there before you run the very last consolidation? I suspect those folders may have been created and not cleaned up when your consolidation was erroring out (which we should investigate). In general, yes, it is safe to delete the folders if they are empty or if they are missing file `__fragment_metadata.tdb` and the corresponding `.ok` file in the array folder (as the reader will just ignore those).

Another alternative is to use `tiledb_array_schema_set_allows_dups` to specify that an array allows duplicates. In that case there will be neither duplicate checking, nor deduplication.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Mtrl\_Scientist](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/mtrl_scientist/32/134_2.png) [@Mtrl\_Scientist](https://forum.tiledb.com/u/Mtrl_Scientist)\
**Post date:** [November 3, 2020, 4:18pm UTC](https://forum.tiledb.com/t/empty-folder-when-using-dedup-coords/264/3 "2020-11-03T16:18:20Z")

</div>

Thanks!  
I’m not sure if they were there before the last consolidation.
