OpenMetadata/openmetadata-spec
Pere Miquel Brull f4cb7d0f14
feat(ingestion): add QuestDB database connector (#27604)
* feat(ingestion): add QuestDB database connector

QuestDB speaks the PostgreSQL wire protocol but implements a minimal
pg_catalog, so the default PG dialect queries fail on the CHAR->DOUBLE
cast in pg_class.relkind. This connector routes SQLAlchemy inspection
through information_schema and short-circuits constraint/index lookups
(QuestDB has no PK/FK/unique/indexes), letting CommonDbSourceService
handle the rest of the topology unchanged.

- Fixed /qdb target in the psycopg2 URL regardless of databaseName
  (which remains the OpenMetadata display name)
- get_database_names defaults to 'qdb' instead of 'default'
- 12 unit tests + live-verified against QuestDB 9.3.5 on localhost:8812

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(questdb): address review feedback — rename to QuestDB, wire UI

Code review fixes for PR #27604:

Blockers resolved:
- Rename Questdb -> QuestDB across schema, enum, Python classes, and all
  generated TS files. Matches peer connectors (PinotDB, DynamoDB) and the
  product's actual brand. Changing post-merge would be a breaking migration.
- Remove sslConfig from schema. QuestDB's sslConfig was declared but never
  wired — ssl_manager.check_ssl_and_init is @singledispatch and has no
  QuestDBConnection registration, so enabling SSL in the UI was a silent
  no-op. Can be added in a follow-up with an explicit psycopg2 wiring.

Warnings resolved:
- authType now in schema's required array — was failing with opaque 401.
- Delete dead queries.py (QUESTDB_TEST_GET_TABLES was defined but never
  imported).
- Add bytea -> LargeBinary to the type map (verified via live information_schema
  probe against QuestDB 9.3.5 — all other native types normalize to standard
  PG names that were already mapped).
- Complete type annotations on utils._get_table_names, _get_columns,
  _information_schema_type.
- Dialect patch test now uses a real PGDialect_psycopg2 instance instead of
  a MagicMock dialect, so it catches signature drift against the real
  SQLAlchemy Inspector contract. Added a separate test that verifies
  get_table_names emits a query against information_schema.tables (not
  pg_catalog).
- Add ingestion_logger() to utils.py with a debug log on dialect patching.
- _empty_view_definition now returns None instead of "" to match how other
  dialects signal the absence of a DDL.

Also fixes UI visibility (QuestDB was missing from the service picker):
- Regenerate 15 TS enum files via json2ts.sh -> quicktype so the new
  DatabaseServiceType.QuestDB value flows through the UI.
- Register service-icon-questdb.png in ServiceIconUtils.ts.
- Add locales/en-US/Database/QuestDB.md connector form docs.
- Add quicktype as a devDependency — json2ts.sh needs it and it wasn't
  installed.

Docs: update skills/connector-building and skills/standards/registration
to reflect reality — i18n locale files are not needed, icon + locale MD
registration steps are, and Services.constant.ts is deprecated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* skill

* fix(questdb): restore databaseSchema field for test connection

test_connection_db_schema_sources reads service_connection.databaseSchema
directly with no hasattr guard. Removing it from the schema in the prior
review fix broke GetTables and GetViews steps:

  'QuestDBConnection' object has no attribute 'databaseSchema'

Restored as an optional string with a clearer description (defaults to
public when unset).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix owners

* add yaml

* Update generated TypeScript types

* Sync package.json and yarn.lock with main

* Fix: ingestion files , Added Lineage for questdb tests and UI changes, Refactored code

* FIX: python_checkstyle

* Fix: test and unused param

* Fix: yield_table enforcing tabletype to partition, Refactored lineage

* Fix: Failing test and remove print statement

* FIX: python_checkstyle and added error handling

* FIX: Resolved comments

* FIX: failing tests and schema cleaning

* Minor change

* Fix: Failing unit tests

* Fix: Unit test unrelated changes ignored

* FIX: tests

* Fix: Failing test due to extra parameter in yaml

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Akash Verma <akashverma@Akashs-MacBook-Pro-2.local>
Co-authored-by: Akash Verma <138790903+akashverma0786@users.noreply.github.com>
2026-05-11 13:02:32 +05:30
..
src feat(ingestion): add QuestDB database connector (#27604) 2026-05-11 13:02:32 +05:30
lombok.config Issue-19251: Upgrade dropwizard to 4.x and Jetty to 11.x (#19252) 2025-05-27 20:31:59 +05:30
pom.xml Fix Metrics collection; reduce no.of metrics; improve slow request lo… (#25751) 2026-03-13 13:38:31 -07:00