# Programatically getting information about table DEDUP

**URL:** <https://community.questdb.com/t/programatically-getting-information-about-table-dedup/135>\
**Category:** Community\
**Tags:** question\
**Created:** [August 2, 2024, 4:30pm UTC](https://community.questdb.com/t/programatically-getting-information-about-table-dedup/135 "2024-08-02T16:30:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex004/uploads/questdb/original/1X/b6b1b349e598d0550947e63d7923a9d7df0279eb.png) [@system](https://community.questdb.com/u/system)\
**Post date:** [August 2, 2024, 4:30pm UTC](https://community.questdb.com/t/programatically-getting-information-about-table-dedup/135/1 "2024-08-02T16:30:38Z")

</div>

I have created a table like this

```auto
CREATE TABLE 'btc_trades3' (
  symbol INT,
  side SYMBOL capacity 256 CACHE,
  price DOUBLE,
  amount DOUBLE,
  timestamp TIMESTAMP
) timestamp (timestamp) PARTITION BY DAY WAL DEDUP UPSERT KEYS(symbol, timestamp);

```

I know I can use the “Copy Schema To Clipboard” link in the web console to get the schema, but I would like to find programmatically if a table has deduplication active and what’s the configuration. I tried using the `wal_tables()` function, but that gives me some metadata that does not include deduplication.

Are there any other functions I could use? Thanks!

---

<div class="post-metadata">

**Author:** ![javier](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/javier/32/29_2.png) [@javier](https://community.questdb.com/u/javier)\
**Post date:** [August 2, 2024, 4:31pm UTC](https://community.questdb.com/t/programatically-getting-information-about-table-dedup/135/2 "2024-08-02T16:31:33Z")

</div>

The `wal_tables` function gives only information about WAL processing, like table suspension, transaction info and so on. But it does not provide schema metadata.

We can use instead these two separate functions:

```auto
select * from tables() where table_name = 'your_table';
select * from table_columns('your_table');

```

The first one tells you if dedup is active, the second one lets you see which are the upsert/deduplication columns. Please see the screenshots below with one of my own tables:

 ![1](https://canada1.discourse-cdn.com/flex004/uploads/questdb/original/1X/1f412d547c30990106094b501172c40847a9372b.png)  
 ![2](https://canada1.discourse-cdn.com/flex004/uploads/questdb/original/1X/d5e53f9b60618060583381dc88e854f973040088.png)
