Hey <@U04S8PLJWMT> — we could use some help diggin...
# ask-ai
j
Hey @kapa.ai — we could use some help digging into a persistent smallmoney default value type error. Here’s what we’ve confirmed so far: • Our Airbyte instance is running on a long-lived Postgres RDS metadata DB. • We spun up a fresh Airbyte instance on a Linux box with an internal Postgres DB. • When we ran the fresh instance with its clean DB, no errors. • As soon as we pointed the fresh instance at our BI DB snapshot, the error reproduced. • We just tested again with brand-new connectors for both source and destination, and the error still fires so it’s not tied to old job configs. That makes us think the issue is rooted in how smallmoney is being persisted/typed inside Airbyte’s Postgres metadata. Question: Which Airbyte internal tables should we be looking at to troubleshoot this further? For example, should we be inspecting actor_definition, actor, connection, configured_catalog, state— or others that hold type mappings/defaults? Any guidance on where this smallmoney default value type mismatch would most likely live in the DB would be huge.
k
Thanks for the detailed repro steps — that strongly suggests something in the Airbyte config (metadata) database rather than the worker/runtime. From the documented config DB catalog, these are the tables most relevant to diagnosing type mapping/defaults and how a connector is resolved at runtime: - actor_definition and actor_definition_version: define connector identities and versions that could influence how types are handled (via the referenced default_version_id). If a prior seed/migration created unexpected defaults or metadata for a connector, you’d see it here. [[actor_definition (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#actor_definition); [actor_definition (Next)](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#actor_definition)] - actor: the concrete source/destination instances in your workspace with their configuration JSONB. If the issue is tied to how a specific connector instance is configured (e.g., JDBC params, SSL modes, etc.) it will show here. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database); [Config DB (Next)](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] - actor_catalog: stores the discovered schema (catalog JSONB) for a source. If a source discovery step normalized a database type like smallmoney into an unexpected Airbyte type, you should see that reflected in this JSON. This is a prime place to compare the “clean DB” instance vs. the RDS snapshot-backed instance. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database); [Config DB (Next)](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] - active_declarative_manifest: if your connectors are declarative, a manifest here could affect field typing during discovery. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database); [Config DB (Next)](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] Also useful context when investigating mapping behavior at the destination: - For Postgres destination, the Destinations V2 typing layer maps Airbyte “object/array” to JSONB and uses a fixed mapping for primitive types. If your error surfaces when loading into Postgres, confirm which Airbyte type the field resolves to in the final schema expectations. [[Postgres schema map](https://docs.airbyte.com/integrations/destinations/postgres#schema-map); [Upgrading to Destinations V2](https://docs.airbyte.com/release_notes/upgrading_to_destinations_v2)] What to check step-by-step: 1) Compare actor_definition/default_version_id and any related metadata between your clean instance and the RDS snapshot-backed instance to see if an older connector version seed is persisted. [[actor_definition (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#actor_definition)] 2) Inspect actor rows for the affected source and destination to confirm their configuration JSON and that they reference the expected definitions/versions. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database)] 3) Pull the latest actor_catalog for the affected stream(s) and search for the column with smallmoney. Note the discovered Airbyte type in the catalog JSONB; this is where a mismatch usually first appears. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database)] 4) If using declarative connectors, confirm whether active_declarative_manifest is present for the connector and whether it defines custom type coercions. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database)] Limitations: The provided docs list the core config tables but don’t include tables like connection, configured_catalog, or state, nor do they document smallmoney-specific handling. If you need to trace job-by-job behavior, you’d typically also review job logs and the discovered catalog persisted for that connection, but the knowledge sources here don’t detail those additional tables. I'm sorry, but there’s no information in the sources about smallmoney-specific defaults or a table that stores explicit SQL type-to-Airbyte type overrides beyond the catalog JSON. [[Config DB (1.7)](https://docs.airbyte.com/platform/1.7/understanding-airbyte/database-data-catalog#config-database)]
j
@kapa.ai the stream in the fresh instance runs without errors, but the stream in the old instance throws the following error, even though AB is the same version 1.8.2 and the connectors are same versions, and the jobs are configured identically... io.airbyte.cdk.integrations.source.relationaldb.state.FailedRecordIteratorException: java.lang.RuntimeException: java.lang.RuntimeException: io.debezium.DebeziumException: Failed to set field default value for 'VendSysReplica.dbo.Asset.CouponValue' of type smallmoney, the default value is 1 of type class java.lang.String\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:38)\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:18)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.LazyAutoCloseableIterator.computeNext(LazyAutoCloseableIterator.kt:45)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.CompositeIterator.computeNext(CompositeIterator.kt:67)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.CompositeIterator.computeNext(CompositeIterator.kt:67)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.produceMessages(IntegrationRunner.kt:234)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.readSerial(IntegrationRunner.kt:291)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:190)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:119)\n\tat io.airbyte.integrations.source.mssql.MssqlSource.main(MssqlSource.java:636)\nCaused by: java.lang.RuntimeException: java.lang.RuntimeException: io.debezium.DebeziumException: Failed to set field default value for 'VendSysReplica.dbo.Asset.CouponValue' of type smallmoney, the default value is 1 of type class java.lang.String\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumShutdownProcedure.initiateShutdownProcedure(DebeziumShutdownProcedure.kt:95)\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumRecordIterator.requestClose(DebeziumRecordIterator.kt:288)\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumRecordIterator.computeNext(DebeziumRecordIterator.kt:125)\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumRecordIterator.computeNext(DebeziumRecordIterator.kt:37)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:32)\n\t... 27 more\nCaused by: java.lang.RuntimeException: io.debezium.DebeziumException: Failed to set field default value for 'VendSysReplica.dbo.Asset.CouponValue' of type smallmoney, the default value is 1 of type class java.lang.String\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumRecordPublisher.close(DebeziumRecordPublisher.kt:124)\n\tat io.airbyte.cdk.integrations.debezium.AirbyteDebeziumHandler.getIncrementalIterators$lambda$1(AirbyteDebeziumHandler.kt:108)\n\tat io.airbyte.commons.concurrency.VoidCallable.call(VoidCallable.kt:12)\n\tat io.airbyte.cdk.integrations.debezium.internals.DebeziumShutdownProcedure.initiateShutdownProcedure(DebeziumShutdownProcedure.kt:91)\n\t... 33 more\nCaused by: io.debezium.DebeziumException: Failed to set field default value for 'VendSysReplica.dbo.Asset.CouponValue' of type smallmoney, the default value is 1 of type class java.lang.String\n\tat io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:470
k
A message from kapa.ai
Thanks for sharing the stack trace — the failure happens while Debezium builds the table schema and tries to apply the column’s default. Specifically, it can’t coerce the default value “1” (string) into the MSSQL smallmoney type, so Debezium throws during TableSchemaBuilder.addField. That aligns with other Debezium default‑value parsing failures we’ve seen in Postgres sources where defaults couldn’t be parsed/evaluated and caused discovery/snapshot errors. [[Forum: NoSuchMethodError default parsing](https://discuss.airbyte.io/t/1638); [PG generated columns/defaults warning](https://github.com/airbytehq/airbyte/issues/45338)] Given your A/B test, the difference likely lives in the Airbyte metadata DB (not the connector binaries), so I’d focus on inspecting the stored discovery/catalog and definition/version wiring. The docs that describe the config/metadata DB point to these tables as the most useful for this kind of mismatch: - actor_definition and actor_definition_version: confirm the MSSQL source you’re using resolves to the same definition/version IDs in both environments (older seeded versions can change how defaults are handled). [[actor_definition](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#actor_definition)] - actor: verify the source instance’s JSON config and referenced definition/version IDs match across the two environments. [[Config DB](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] - actor_catalog: pull the latest stored catalog for the affected source and check the “CouponValue” field. You’re looking for: - what MSSQL type discovery recorded (should be smallmoney per mapping) - whether a default value is embedded in the catalog’s JSON and its JSON type (string vs number) Differences here between environments would explain the failure. [[Config DB](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] - active_declarative_manifest: if present (for declarative connectors), check whether any field coercions or transformations could introduce the default as a string. [[Config DB](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] For reference, the MSSQL source maps smallmoney to a numeric Airbyte type; there’s no special handling for defaults documented, so discovery should record it as a number. If the old metadata contains a catalog where the default is serialized as a string, Debezium will fail when constructing the schema. [[MSSQL data types](https://docs.airbyte.com/integrations/sources/mssql#data-type-mapping)] Practical steps to isolate/fix: 1) Diff the actor_definition/version and actor rows (IDs and version fields) for the MSSQL source between the “clean” instance and the RDS‑backed instance. [[actor_definition](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#actor_definition)] 2) Query actor_catalog for the affected stream/table and inspect the JSON for CouponValue in both environments. If the old instance shows the default as a JSON string (“1”) vs a number (1), that’s your root cause. [[Config DB](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database)] 3) If you confirm a bad catalog, trigger a new discovery on the source in the old instance (or delete the stale actor_catalog rows for that source so discovery repopulates) and re‑select streams. Limitations: The knowledge sources don’t document smallmoney‑specific default parsing behavior or additional metadata tables like connection/configured_catalog/state, so the guidance above focuses on the documented config tables and known default‑parsing failure patterns. [[Config DB](https://docs.airbyte.com/platform/next/understanding-airbyte/database-data-catalog#config-database); [MSSQL data types](https://docs.airbyte.com/integrations/sources/mssql#data-type-mapping)]
j
@kapa.ai the catalog looks the same, the affected fields (smallmoney) are set to number in the catalog, why is debezium trying to set a string on a number field?
k
A message from kapa.ai
Short answer: because Debezium parses column defaults from the source database independently of Airbyte’s stored catalog, and default parsing can yield strings even when the column’s logical type is numeric. The catalog showing smallmoney → number doesn’t control how Debezium reads and coerces the column default at schema-build time. What we know from similar issues: - Debezium can fail while building table schema if a default cannot be parsed/coerced to the target type; the exception is thrown in TableSchemaBuilder.addField during default handling. [[PG defaults parsing logs](https://github.com/airbytehq/airbyte/issues/45338)] - Type mismatches between what Debezium produces during CDC and what the rest of the pipeline expects are a known class of problems (e.g., decimals as strings vs numbers causing downstream failures). [[Postgres numeric nulling](https://github.com/airbytehq/airbyte/issues/38470)] - For MSSQL specifically, Airbyte’s documented mapping lists smallmoney as a number, but there’s no doc indicating special default-value handling; so Debezium’s behavior at runtime governs how the default literal is interpreted. [[MSSQL type mapping](https://docs.airbyte.com/integrations/sources/mssql#data-type-mapping)] Why the two instances differ even with the same versions: - The catalog equality only tells us the discovered logical type. Debezium still reads the table definition (including DEFAULT) from the source and tries to set the default on the schema. If the default literal is stored or exposed in a way that Debezium reads as a string in one environment (e.g., “1” vs 1), it will attempt to coerce a string into smallmoney and can fail at TableSchemaBuilder. This exact failure pattern is what your stack trace shows (default “1” of type String on smallmoney). [[PG defaults parsing logs](https://github.com/airbytehq/airbyte/issues/45338)] What to validate next: - Inspect the source DB column definition for the failing table in the problematic environment: is the DEFAULT exactly 1, 1.00, '1', or an expression? Differences like a quoted literal can make Debezium treat it as a string. The knowledge sources don’t include MSSQL-specific default parsing rules, so I can’t cite an exact rule set here. I’m sorry, but the knowledge sources do not explicitly document how MSSQL smallmoney defaults are parsed by Debezium or Airbyte beyond the general behavior seen in similar issues. [[PG defaults parsing logs](https://github.com/airbytehq/airbyte/issues/45338); [MSSQL type mapping](https://docs.airbyte.com/integrations/sources/mssql#data-type-mapping)] Why this points to Debezium/runtime rather than catalog: - Even when schemas match, CDC rows can differ in representation (numbers vs strings) leading to typecast/nulling downstream; this has been observed with numeric/decimal types in CDC paths. [[Postgres numeric nulling](https://github.com/airbytehq/airbyte/issues/38470)] If you confirm the DEFAULT is quoted in the source DDL on the failing environment, unquoting it (e.g., DEFAULT 1.00 without quotes) should avoid Debezium treating it as a string. If it isn’t quoted, this may be a Debezium edge case with MSSQL smallmoney; in that case, sharing the exact column DDL and Debezium version used by your source connector would help reproduce and triage.