Add DuckDB FlightSQL sample connector (ADBC)#542
Conversation
…shared testframework
…WithNegativeLength test
| @@ -0,0 +1,104 @@ | |||
| # DuckDb Connector (FlightSQL / ADBC) | |||
There was a problem hiding this comment.
Can we add the documentation in the Power Query Documentation samples-directory and a dedicated page like GitHub Connector Sample?
There was a problem hiding this comment.
Sure, once this is published, we can add documentation for it in the power-query learn docs.
| @@ -0,0 +1,426 @@ | |||
| // DuckDb.pq — Sample DuckDb connector using FlightSQL via Adbc.Connection. | |||
There was a problem hiding this comment.
Can we add a demo for the connector to the PR description?
There was a problem hiding this comment.
Who would be the target audience for the demo and what is that we want to demo here?
| @@ -0,0 +1,495 @@ | |||
| // SqlGenerator.pqm — DuckDb-specific SQL generator overrides. | |||
There was a problem hiding this comment.
I'd like Alok's take on this. SQLGenerator is its own beast that we don't have public docs for.
|
|
||
| Queries `information_schema.table_constraints` + `key_column_usage` for PKs, applies them via `Type.ReplaceTableKeys`. Exposes `GetForeignKeys()` for FK discovery. Power BI uses these to auto-create relationships. | ||
|
|
||
| ## Supported Types |
There was a problem hiding this comment.
We might need to clarify that these are specific to DuckDb and not the only types that are supported.
Summary
Adds a new sample connector for DuckDB using the FlightSQL protocol via ADBC (Arrow Database Connectivity). This is the first ADBC-based connector sample in the repository, intended as a reference implementation for partners building FlightSQL connectors for Power BI.
What's included
Connector source:
Adbc.Connection-based connectivity with FlightSQL gRPC transportSqlView.Generatorwith DuckDB SQL dialect overridesinformation_schemaSQL Generator architecture:
SqlGeneratorCommon.pqm: Shared SQL92 base infrastructure (reusable by other ADBC connectors)SqlGenerator.pqm: DuckDB-specific overrides (LIMIT/OFFSET, function remapping, typed literals, type facets)Test suite:
Notes
Tests/Credentials/are dummy values for the local Docker environment