airbytehq / airbytehq/airbyte

[destination-snowflake] Snowflake destination fails on empty stream (`partition_id` missing)

Open
#72,385 3 comments 0 reactions 0 assignees View on GitHub
area/connectors autoteam community connectors/destination/snowflake connectors/source/mysql needs-triage team/extensibility type/bug
Dominant language
Python
Stars
22.1k
Forks
5.3k
PR merge metrics
PR metrics pending

Description

### Connector Name

destination-snowflake

### Connector Version

4.0.31

### What step the error happened?

None

### Relevant information

**Summary:**
Sync fails when a stream is empty. Source and destination checks succeed, but the destination pipeline throws `Expected partition_id and id in additional properties (got [id]).`

**Repro (concise):**
1. Run the sync.
2. Ensure the stream has 0 rows.
3. Sync fails in destination.
4. Expected: Sync succeeds with 0 records.

**Actual:** Destination pipeline crashes with partition_id missing.

**Versions:** Airbyte 2.0.1, source-mysql 3.51.5, destination-snowflake 4.0.31.

### Relevant log output

```shell
java.lang.IllegalStateException: Expected `partition_id` and `id` in additional properties (got [id])
at io.airbyte.cdk.load.message.DestinationMessageFactory.keyFromAdditionalPropertiesMaybe(DestinationMessageFactory.kt:179)
...
Failures: [{
"failureOrigin": "destination",
"failureType": "system_error",
"internalMessage": "java.lang.IllegalStateException: Expected `partition_id` and `id` in additional properties (got [id])",
"metadata": { "connector_command": "write" }
}]
Sync summary: {
"status": "failed",
"recordsSynced": 0,
"streamStats": [{
"streamName": "...",
"streamNamespace": "...",
"stats": { "recordsEmitted": 0, "recordsCommitted": 0 }
}]
}
```

### Contribute

- [ ] Yes, I want to contribute

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11049

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.