-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Bug description
Trying the product using the compose defined in docker-compose.yaml, I noticed that primary keys was not detected for PostgreSQL connections.
Investigating on postgres.py I noticed that primary keys are not manged (same for Oracle), while the implementations for MySql and MsSql consider only the last detected column in composite primary key:
def get_table_list(self) -> list[Table]:
...
for row in response:
...
# if column is primary key
if row["column_key"] == "PRI":
unique_tables[schema_table].primaryKey = row["column_name"]The if at the end of for loops takes only the last detected column.
I don't know Trino nor Snowflakes to determine if both implementations are affected from the same problem.
How to Reproduce
Run the ibis-server, and try to invoke the /v2/connector/{dbms}/metadata/tables endpoints for all the connectors.
Expected behavior
In my proposal, the primaryKey field of class Table (dto.py) should be a list of strings, with all fields belonging to the key.
Desktop (please complete the following information):
Test were perfomed using only docker images
Wren AI Information
- Versions:
WREN_PRODUCT_VERSION=0.17.0WREN_ENGINE_VERSION=0.14.8WREN_AI_SERVICE_VERSION=0.17.1IBIS_SERVER_VERSION=0.14.8WREN_UI_VERSION=0.22.1WREN_BOOTSTRAP_VERSION=0.1.5