Dataherald / dataherald

Interact with your SQL database, Natural Language to SQL using LLMs
https://dataherald.readthedocs.io/en/latest/
Apache License 2.0
3.35k stars 234 forks source link

How to specify the tables to be used when generating a query? #446

Closed zhanpengjie closed 7 months ago

zhanpengjie commented 7 months ago

I have many tables in my database, and I would like to be able to specify the tables that can be used in a query, while also improving query accuracy

Harshitdy commented 7 months ago

Hello @zhanpengjie, As far I know you can sync you tables using api/v1/table-descriptions/sync-schemas endpoint and you can specify your tables like

{
  "db_connection_id": "660aab39fd8c1351d3b4b2c4",
  "table_names": [
    "table1", "table2",......
  ],
  "metadata": {}
}