-
Notifications
You must be signed in to change notification settings - Fork 39
feat(connectors): BI-6585 Add column tables support for YDB #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
02ef2a5 to
9f1aeeb
Compare
d7bec93 to
423c9ce
Compare
234fada to
a0f6652
Compare
4156d76 to
01e92a0
Compare
636eec7 to
6d54f1d
Compare
574a010 to
9575ee3
Compare
9575ee3 to
333c80c
Compare
423c9ce to
cd9f051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for YDB column tables to the connector implementation. Column tables are a specific YDB table type optimized for analytical workloads (OLAP).
- Enables column table features in the YDB Docker environment
- Adds test infrastructure for column table datasets
- Updates table discovery to include column tables and views
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/dl_connector_ydb/pyproject.toml | Corrects path reference to dl-sqlalchemy-ydb dependency |
| lib/dl_connector_ydb/docker-compose/Dockerfile.db-ydb | Updates base image to official YDB platform image with pinned SHA |
| lib/dl_connector_ydb/docker-compose.yml | Enables column tables and OLAP schema operations via feature flags |
| lib/dl_connector_ydb/dl_connector_ydb_tests/db/config.py | Adds schema definitions and type mappings for column table testing |
| lib/dl_connector_ydb/dl_connector_ydb_tests/db/api/test_dataset.py | Adds test suite for column table dataset functionality |
| lib/dl_connector_ydb/dl_connector_ydb_tests/db/api/base.py | Implements column table test fixture with custom creation logic |
| lib/dl_connector_ydb/dl_connector_ydb/core/ydb/adapter.py | Updates table discovery to include column tables and views |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ] | ||
|
|
||
| # Leave only values in COLUMN_TABLE_SCHEMA | ||
| COLUMN_TABLE_DATA = [{key: value for key, value in row.items() if key in COLUMN_TABLE_SCHEMA} for row in TABLE_DATA] |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition if key in COLUMN_TABLE_SCHEMA checks if the key exists in a tuple of tuples, which will always be False. This should check against the column names extracted from COLUMN_TABLE_SCHEMA. Consider: COLUMN_TABLE_DATA = [{key: value for key, value in row.items() if key in {col[0] for col in COLUMN_TABLE_SCHEMA}} for row in TABLE_DATA]
| COLUMN_TABLE_DATA = [{key: value for key, value in row.items() if key in COLUMN_TABLE_SCHEMA} for row in TABLE_DATA] | |
| COLUMN_TABLE_DATA = [{key: value for key, value in row.items() if key in {col[0] for col in COLUMN_TABLE_SCHEMA}} for row in TABLE_DATA] |
| db.get_current_connection().connection.cursor().execute_scheme(query) | ||
|
|
||
| db.create_table(db_table.table) | ||
| db.insert_into_table(db_table.table, TABLE_DATA) |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TABLE_DATA contains columns not present in COLUMN_TABLE_SCHEMA (e.g., 'some_bool', 'some_interval'). This will cause insertion to fail. Use COLUMN_TABLE_DATA instead of TABLE_DATA.
| db.insert_into_table(db_table.table, TABLE_DATA) | |
| db.insert_into_table(db_table.table, COLUMN_TABLE_DATA) |
No description provided.