Repository navigation
MSSQL connector does not report empty streams in streamStats (unlike PostgreSQL)
#83773
Replies: 2 comments 1 reply
|
Hi SivaramaKrishnan (@sivaramakrishnan-stratforge), thank you for the detailed report — the side-by-side comparison between the Postgres and MSSQL sources, with versions and a clear reproduction, is very helpful. We're looking into the difference in A couple of things that would help the investigation, if you're able to add them:
Interim workaround for your notification use caseUntil the reporting behavior is settled, one approach is to treat the configured catalog as the source of truth rather than This is a workaround for the asymmetry you've described, not a recommendation about the intended behavior. On your third question, we didn't find an existing public issue tracking Need more help? Join Airbyte Community Slack for peer support, or if you're a Cloud customer, open a support ticket referencing this URL. |
|
Hi Airbyte Support Bot (@airbyte-support-bot) any update on this? |
Uh oh!
There was an error while loading. Please reload this page.
Environment
airbyte/source-mssql:4.0.15airbyte/source-postgres:3.8.1airbyte/destination-clickhouse:1.0.0Observed Behavior
I'm seeing inconsistent behavior between the PostgreSQL and MSSQL source connectors when syncing empty tables.
PostgreSQL (
source-postgres:3.8.1)If a table contains 0 rows, the stream is still included in the job's
streamStatswith explicit zero values.Example:
{ "streamName": "sync_2", "stats": { "recordsEmitted": 0, "bytesEmitted": 0, "recordsCommitted": 0 } }The logs also show that the connector inspects the table, determines that it is empty, and still emits the appropriate checkpoint/state messages.
MSSQL (
source-mssql:4.0.15)For the same scenario:
The empty stream is completely absent from
streamStats.There is:
Only the non-empty tables appear in the job response.
Reproduction
Database contains three tables:
table_1→ ~50k rowstable_2→ ~50k rowstable_3→ 0 rowsRun a Full Refresh | Overwrite sync to ClickHouse.
Result
PostgreSQL source
streamStatscontains all three streams, including the empty one with zero values.MSSQL source
streamStatsonly contains the two non-empty streams. The empty table is omitted entirely.Questions
Is omitting empty streams from
streamStatsthe expected behavior for the MSSQL connector?Is this because
source-mssqlstill relies on the older JDBC/AbstractJdbcSourceimplementation, while newer connectors such as PostgreSQL have migrated to the newer CDK architecture that reports statistics for every processed stream, including empty ones?Is there an existing GitHub issue or roadmap item for migrating the MSSQL connector to the newer CDK implementation, or otherwise making
streamStatsbehavior consistent across connectors?Why this matters
I'm building sync-completion notifications that report the outcome of every synced table.
With the PostgreSQL connector, I can reliably identify tables that were processed but contained no data by checking for a
streamStatsentry with zero values.With the MSSQL connector, there is no equivalent signal because empty streams are omitted entirely. This makes it impossible to distinguish between:
Is there a recommended way to detect successfully processed empty streams for the MSSQL connector, or is this currently a known limitation?
All reactions