i am trying to create connection using airbyte oss...
# replication-troubleshooting
a
i am trying to create connection using airbyte oss API with "incremental append" in the payload but it is creating connection using "Full write | overwrite" value can somebody help me on this , here is the following payload :
Copy code
syncCatalog : {["streams": [
      {
        "stream": {
          "name": "orders"
        },
        "config": {
          "aliasName": "orders",
          "selected": true,
          "syncMode": "incremental",
          "destinationSyncMode": "append",
          "cursorField": ["updated_at"],
          "primaryKey": [["id"]]
        }
      }]}
k
Based on the information in the knowledge sources, your payload for creating a connection with "incremental append" sync mode appears to be correctly structured. The relevant fields are: -
"syncMode": "incremental"
(for the source) -
"destinationSyncMode": "append"
(for the destination) -
"cursorField": ["updated_at"]
(required for incremental sync) -
"primaryKey": [["id"]]
(not required for append, but harmless) This matches the expected configuration for an Incremental | Append sync mode in Airbyte OSS API, as described in the Airbyte protocol documentation. The
sync_mode
and
destination_sync_mode
fields are the key determinants for the sync mode, and your values are correct for Incremental | Append. The
cursor_field
is required for incremental syncs, which you have provided. The
primary_key
is only required for deduplication modes, but including it does not cause issues for append mode. See the protocol details here: [Airbyte Protocol - ConfiguredAirbyteStream](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#configuredairbytestream). If your connection is still being created as "Full write | overwrite" (i.e., Full Refresh | Overwrite), possible reasons could be: 1. Connector Capabilities: The source or destination connector you are using may not support incremental sync or append mode. The sync modes available depend on what the connectors declare as supported. If either the source does not support incremental, or the destination does not support append, Airbyte will fall back to a supported mode, often Full Refresh | Overwrite. You can check the supported sync modes for your connectors in their documentation or via the Airbyte API's discovery endpoint. 2. Payload Formatting: Ensure your payload is correctly formatted and matches the expected API schema. For example, the top-level key should be
syncCatalog
(not
syncCatalog : {["streams": ...]}
), and the JSON structure should be valid. 3. API Version or Bugs: There may be a bug or version mismatch. Some users have reported issues where the API or UI does not honor the requested sync mode due to connector or platform limitations. What you can do: - Double-check the supported sync modes for your source and destination connectors. - Validate your JSON payload structure. - Try creating the connection via the Airbyte UI to see which sync modes are available for your stream. - If the issue persists, it may be a bug or limitation—consider checking the Airbyte GitHub issues or forums for similar reports. For reference on sync mode configuration and requirements, see: [Airbyte Protocol - ConfiguredAirbyteStream](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#configuredairbytestream) and [Sync Modes](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes). If you provide more details about your source and destination connectors, I can help you check their supported sync modes.
a
@kapa.ai i am using shopify connector as source and s3 as destination and in UI i can see incremtal | append is there
k
A message from kapa.ai
Given your setup—Shopify as the source and S3 as the destination—**Incremental | Append** sync mode is supported and should be selectable in the Airbyte UI: - The Shopify source supports both Full Refresh and Incremental syncs, including Incremental | Append mode [Shopify Supported Sync Modes](https://docs.airbyte.com/integrations/sources/shopify#supported-sync-modes). - The S3 destination supports Incremental - Append sync mode [S3 Destination Supported Sync Modes](https://docs.airbyte.com/integrations/destinations/s3#supported-sync-modes). If you see Incremental | Append in the UI, your connectors support it. Your API payload structure for the stream should look like this:
Copy code
json {   "streams": [     {       "stream": {         "name": "orders"       },       "config": {         "aliasName": "orders",         "selected": true,         "syncMode": "incremental",         "destinationSyncMode": "append",         "cursorField": ["updated_at"],         "primaryKey": [["id"]]       }     }   ] }
If the connection is still being created as Full Refresh | Overwrite via the API: - Double-check that your API payload matches the above structure and is valid JSON. - Ensure you are using the correct endpoint and API version. - If the issue persists, it may be a bug or a mismatch between the API and UI behavior. Summary: Your connectors support Incremental | Append, and your payload appears correct. If the API is not honoring this, it could be a technical issue outside of your configuration. The knowledge sources confirm that both Shopify and S3 support Incremental | Append sync mode [Shopify Supported Sync Modes](https://docs.airbyte.com/integrations/sources/shopify#supported-sync-modes) [S3 Destination Supported Sync Modes](https://docs.airbyte.com/integrations/destinations/s3#supported-sync-modes).
t
Hey, not sure if this helps but here is my python code with the different enum with the options of each syncMode:
Copy code
class SyncType:
    INCREMENTAL_APPEND = "incremental_append"
    INCREMENTAL_DEDUPED_HISTORY = "incremental_deduped_history"
    FULL_REFRESH_OVERWRITE = "full_refresh_overwrite"
    FULL_REFRESH_APPEND = "full_refresh_append"


def get_meta_connection_request(
    source_id: str, destination_id: str, app_id: str
) -> dict:
    # BigQuery automatically converts dots to underscores, but we do it explicitly for consistency
    app_id_formatted = app_id.replace(".", "_")
    return {
        "sourceId": source_id,
        "destinationId": destination_id,
        "namespaceDefinition": "custom_format",
        "namespaceFormat": "meta",
        "prefix": f"meta_{app_id_formatted}_",
        "configurations": {
            "streams": [
                {
                    "name": "campaigns",
                    "syncMode": SyncType.INCREMENTAL_DEDUPED_HISTORY,
                },
                {
                    "name": "ads_insights",
                    "syncMode": SyncType.INCREMENTAL_DEDUPED_HISTORY,
                },
                {
                    "name": "ad_sets",
                    "syncMode": SyncType.INCREMENTAL_DEDUPED_HISTORY,
                },
                {
                    "name": "ad_account",
                    "syncMode": SyncType.FULL_REFRESH_APPEND,
                },
                {
                    "name": "ads_insights_country",
                    "syncMode": SyncType.INCREMENTAL_DEDUPED_HISTORY,
                },
            ]
        },
        "schedule": {
            "scheduleType": "cron",
            "cronExpression": "0 0 0 ? * * *",  # 00:00 every day
        },
        "nonBreakingSchemaUpdatesBehavior": "propagate_fully",
    }
This makes payload that works using the OSS api on airbyte 1.5 // 1.6 // 1.8 . I don't know for other versions
(Depending on the connector / stream all syncMode might not be available)
a
cool many thanks let me try this
Thanks @Tom Darmon 😭 it’s literally working now 🥳
✅ 1