Slackbot
09/28/2026, 11:51 AMkapa.ai
09/28/2026, 11:51 AMinvalid type [CAST(CONNECTORINSTANCES.XSLT_CONFIGS AS OBJECT)] for parameter 'TO_OBJECT'
The available documents discuss unrelated issues with the MongoDB source (such as saved offset and resume token errors) and Snowflake destination (such as reserved keywords, timestamp parsing, or numeric casting), but they do not contain details about this specific TO_OBJECT casting error or queries on CONNECTORINSTANCES.XSLT_CONFIGS.
This error appears to originate from a custom transformation, dbt model, view definition, or internal Snowflake query running TO_OBJECT() on a field (XSLT_CONFIGS) that is already typed as an OBJECT or contains an incompatible data structure. You may need to review your custom transformations, normalization queries, or downstream views executed in Snowflake on the synced MongoDB data. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Rafael Felipe
09/28/2026, 11:53 AMkapa.ai
09/28/2026, 11:53 AM3.0.0, the connector uses a Direct Load architecture, writing records directly to final tables rather than creating intermediate raw tables [Postgres; metadata.yaml].
⢠Usage Guidance: Postgres is best suited as a destination for smaller data volumes (e.g., less than 10GB) or testing purposes; for large volumes, a cloud data warehouse (such as Snowflake, BigQuery, or Redshift) is recommended [Postgres].
Prerequisites & Setup ⢠Postgres Version: Requires PostgreSQL server version 9.5 or higher [Postgres].
⢠Connection Security: Airbyte Cloud requires SSL/TLS encryption (TLS is enabled by default) [Postgres].
⢠Required Permissions: A user with privileges to create tables, write rows, and create schemas:CREATE USER airbyte_user WITH PASSWORD 'password';
GRANT CREATE, TEMPORARY ON DATABASE database TO airbyte_user;[Postgres]
Output Schema & Metadata Columns Each stream writes to a final table that includes the extracted source columns along with Airbyte metadata fields:
⢠_airbyte_raw_id (VARCHAR): Unique UUID assigned to each processed event [Schema map].
⢠_airbyte_extracted_at (TIMESTAMP WITH TIME ZONE): Timestamp of when the record was pulled from the source [Schema map].
⢠_airbyte_meta (JSONB): Sync metadata and schema change information [Schema map].
⢠_airbyte_generation_id (BIGINT): Identifier for the sync generation [Schema map].
If you have a specific question about configuring Postgres as a source or destination, troubleshooting an error, or managing schema mappings, please provide more details! š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Rafael Felipe
09/28/2026, 11:54 AMkapa.ai
09/28/2026, 11:54 AMinvalid type [CAST(CONNECTORINSTANCES.XSLT_CONFIGS AS OBJECT)] for parameter 'TO_OBJECT'
occurring in a PostgreSQL-to-Snowflake connection.
While the sources mention other issues when syncing to Snowflake (such as reserved column names causing SQL compilation errors or timestamp parsing failures) [Github Issue (closed): destination-snowflake cannot sync a source table with ROW_NUMBER column to Snowflake; Github Issue (open): Unable to setup Snowflake Connector (as Destination) when Legacy raw tables option enabled], they do not reference TO_OBJECT, XSLT_CONFIGS, or type conversion issues for that parameter.
This error usually indicates that Snowflake's TO_OBJECT() function is being executed (likely in a downstream transformation, dbt model, view, or typing/deduping step) on a field that cannot be converted to an object in that format. Check downstream transformations or schema typing configurations applied to the XSLT_CONFIGS column in Snowflake. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Rafael Felipe
09/28/2026, 11:55 AMkapa.ai
09/28/2026, 11:55 AMinvalid type [CAST(CONNECTORINSTANCES.XSLT_CONFIGS AS OBJECT)] for parameter 'TO_OBJECT'
for a MongoDB to Snowflake connection either.
The knowledge sources discuss other MongoDB source errors (such as Field 'allowDiskUse' is currently not supported) [Github Issue (open): [source-mongodb] Field 'allowDiskUse' is currently not supported] and various Snowflake destination issues (such as ROW_NUMBER column conflicts or unrecognized data values) [Github Issue (closed): destination-snowflake cannot sync a source table with ROW_NUMBER column to Snowflake; Github Issue (closed): [destination-snowflake] Entire connection sync fails if one value is not recognized], but there is no mention of TO_OBJECT parameter errors or queries on CONNECTORINSTANCES.XSLT_CONFIGS.
This SQL compilation error is generated by Snowflake when TO_OBJECT() receives an invalid argument type. In a MongoDB-to-Snowflake sync, this typically happens when:
1. A custom downstream dbt model, view, or transformation attempts to cast XSLT_CONFIGS to an object using TO_OBJECT(CAST(... AS OBJECT)), which is invalid syntax in Snowflake.
2. Typing and deduping attempts to interpret a MongoDB field (XSLT_CONFIGS) whose discovered JSON schema type conflicts with the expected Snowflake variant/object structure.
To resolve it, inspect the connection's sync logs to identify whether the failing query originates from an Airbyte normalization/typing-and-deduping step or from a downstream dbt/custom SQL transformation, and check how XSLT_CONFIGS is being cast or structured in Snowflake. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Rafael Felipe
09/28/2026, 12:01 PMkapa.ai
09/28/2026, 12:02 PMinvalid type [CAST(... AS OBJECT)] for parameter 'TO_OBJECT' compilation error, but the stack trace provides key details about where and why it occurs:
Cause of the Failure 1. Failure Point (TableSchemaEvolutionClient.ensureSchemaMatches / applyChangeset)
According to the stack trace, the failure happens during schema evolution when applying table alterations:io.airbyte.integrations.destination.snowflake.client.SnowflakeAirbyteClient.applyChangeset
io.airbyte.cdk.load.component.TableSchemaEvolutionClient.ensureSchemaMatchesWhen the connector detects a schema change between the source stream and the destination table, it generates SQL statements to evolve the schema and adapt existing columns [SnowflakeDirectLoadSqlGenerator.kt; TableSchemaEvolutionClient.kt].
2. Column Type Evolution to OBJECT
The column XSLT_CONFIGS in the CONNECTORINSTANCES table had its type modified in the incoming stream (for instance, changing from a string/scalar to a structured object/JSON type). To convert existing data to the new type during an ALTER TABLE, the connector generates an UPDATE statement with a conversion expression [Github Issue (open): destination-snowflake: follow-ups from safe type-aware retype casts; SnowflakeDirectLoadSqlGenerator.kt].
3. Snowflake SQL Compilation Failure
The generated SQL contains a call to TO_OBJECT(...) wrapping a CAST(... AS OBJECT) expression. Snowflake rejects this syntax at compile time because TO_OBJECT does not accept an expression that is already cast to or treated as OBJECT.
Potential Workarounds Because this failure occurs during direct-load schema alteration in the connector:
1. Reset or Truncate the Stream in Airbyte
If historical data in the destination does not need to be migrated in-place, resetting/refreshing the CONNECTORINSTANCES stream will drop or recreate the target table with the new schema, bypassing the failing ALTER TABLE / UPDATE retype statement [BigqueryDirectLoadNativeTableOperations.kt].
2. Manually Update the Column in Snowflake
Manually align the XSLT_CONFIGS column's data type in Snowflake to match what the source stream expects (e.g., manually casting/converting the column or renaming/dropping it) so that computeChangeset determines the column is already up-to-date and avoids generating the invalid UPDATE expression [BigqueryDirectLoadNativeTableOperations.kt; TableSchemaEvolutionClient.kt].
3. Check for Connector Updates
Check for newer versions of destination-snowflake. Recent releases have actively addressed retyping casts during schema evolution (such as per-type conversion expressions for scalar-to-object retypes) [Github Issue (open): destination-snowflake: follow-ups from safe type-aware retype casts]. š 0 button š 0 button ā¹ļø Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.