Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 424892c4-daac-4491-b35d-c6688ba547ba
dockerImageTag: 4.0.9
dockerImageTag: 4.0.10
dockerRepository: airbyte/destination-snowflake
documentationUrl: https://docs.airbyte.com/integrations/destinations/snowflake
githubIssueLabel: destination-snowflake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ class SnowflakeDirectLoadSqlGenerator(
), numbered_rows AS (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY $pkList ORDER BY $cursorOrderClause "${COLUMN_NAME_AB_EXTRACTED_AT.toSnowflakeCompatibleName()}" DESC
) AS row_number
) AS _airbyte_intermediate_data_row_number
FROM records
)
SELECT $columnList
FROM numbered_rows
WHERE row_number = 1
WHERE _airbyte_intermediate_data_row_number = 1
"""
.trimIndent()
.andLog()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ internal class SnowflakeDirectLoadSqlGeneratorTest {
), numbered_rows AS (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY "primaryKey" ORDER BY "cursor" DESC NULLS LAST, "_AIRBYTE_EXTRACTED_AT" DESC
) AS row_number
) AS _airbyte_intermediate_data_row_number
FROM records
)
SELECT ${expectedColumns.joinToString(",\n") { it.quote() } }
FROM numbered_rows
WHERE row_number = 1
WHERE _airbyte_intermediate_data_row_number = 1
) AS new_record
ON (target_table."primaryKey" = new_record."primaryKey" OR (target_table."primaryKey" IS NULL AND new_record."primaryKey" IS NULL))
WHEN MATCHED AND (
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/destinations/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ desired namespace.

<details>
<summary>Expand to review</summary>

| Version | Date | Pull Request | Subject |
|:----------------|:-----------|:-----------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 4.0.10 | 2025-10-08 | [66591](https://github.com/airbytehq/airbyte/pull/66591) | Fix to enable syncing a row number column from the source to Snowflake
| 4.0.9 | 2025-10-09 | [67610](https://github.com/airbytehq/airbyte/pull/67610) | Fix an issue with varchar size validation |
| 4.0.8 | 2025-10-09 | [67599](https://github.com/airbytehq/airbyte/pull/67599) | Improve handling of heavily interleaved streams. |
| 4.0.7 | 2025-10-09 | [67590](https://github.com/airbytehq/airbyte/pull/67590) | Use GZIP compression level 5 to improve performance. No longer explicitly `CREATE FILE FORMAT`. |
Expand Down
Loading