Movatterモバイル変換


[0]ホーム

URL:


DOCS >REPLICATION >LOADING >UNDERSTANDING LOADING BEHAVIOR

Get started with a free trial today

Already have an account? Sign in

Understanding Loading Behavior

Learn about the methods Stitch uses to load data into your destination and what the impact will be on your destination tables.

In this guide, we’ll cover:


Loading behavior types

When data is loaded into your destination, Stitch will use one of the following loading behavior types:

Upsert

When data is loaded using the Upsert behavior, existing rows are updated in tables with defined Primary Keys. Stitch will de-dupe records based on Primary Keys before loading them, meaning that only one version of a record will exist in the table at any given time.

Append-Only

When data is loaded using the Append-Only behavior, records are appended to the end of the table as new rows. Existing rows in the table aren’t updated even if the source has defined Primary Keys. Multiple versions of a row can exist in a table, creating a log of how a record has changed over time.


Determining loading behavior

At a high level, loading behavior is determined by the following:

  • The destination’s support for Upsert loading
  • The presence of Primary Keys in the source data and destination
  • The integration or table has pre-configured loading behavior

Upsert loading

Upsert loading is used whenall of the following conditions are met:

  1. The destination supports or is configured to use Upsert loading,and
  2. The data has defined Primary Keys in the sourceand destination,and
  3. The integration or table is not pre-configured to use Append-Only loading

Note: This is applicable to allReplication Methods.

Append-Only loading

Append-Only loading is used whenany of the following conditions are met:

  • The destination only supports or is configured to use Append-Only loading,or
  • The data doesn’t have defined Primary Keys in the sourceor destination,or
  • The integration or table is pre-configured to use Append-Only loading

Examples

Upsert loading example

In this example:

  1. The destination supportsor is configured to use Upsert loading, and
  2. The data has defined Primary Keys in the source and destination, and
  3. The integration or table being loaded is not pre-configured to use Append-Only loading
Click to enlarge: Upsert loading example

Append-Only example

This example is applicableany of the following are true:

  • The destination only supportsor is configured to use Append-Only loading,or
  • The integration or table being loaded is pre-configured to use Append-Only loading,or
  • The source data has defined Primary Keys, but the table in the destination doesn’t. For example: Primary Key table comments are removed from a table in Amazon Redshift.
Click to enlarge: Append-Only loading example

Append-Only loading, no defined source Primary keys

This example is applicable when the source data doesn’t have a defined Primary Key.

When source data that doesn’t have a Primary Key is replicated, Stitch appends an__sdc_primary_key to the data to function as a Primary Key. Data will be loaded using Append-Only loading, regardless of what loading behavior the destination supports or is configured to use.

Click to enlarge: Append-Only loading as a result of no defined Primary Keys

Reference

Destinations and default loading behavior

Note: If a destination supports and is configured to use Upsert loading, Stitch will attempt to use Upsert loading before Append-Only. Allother conditions for Upsert loading must also be met.

DestinationVersionDefault loading behaviorLoading behavior is configurable?
Amazon Redshiftv2Upsert
Amazon S3v1Append-Only
data.worldv1Upsert
Databricks Delta Lake (AWS)v1Upsert
Google BigQueryv1Append-Only
Google BigQueryv2Selected by you
Microsoft Azure Synapse Analyticsv1Upsert
Microsoft SQL Serverv1Upsert
MySQLv1Upsert
Panoplyv2Upsert
PostgreSQLv1Upsert
Snowflakev1Upsert

Append-Only integrations and tables

The integrations listed below are pre-configured to use Append-Only loading for all or some tables.

IntegrationVersionNotes
Amazon S3 CSVv1Unless Primary Keys are defined for the table, Append-Only loading will be used.
Campaign Managerv1All tables use Append-Only loading
Google Adsv2All Report tables
Google Ads (AdWords)v1All Report tables
Microsoft Advertisingv2All Report tables
SFTPv1Unless Primary Keys are defined for the table, Append-Only loading will be used.

RelatedTroubleshooting

Questions? Feedback?

Did this article help? If you have questions or feedback, feel free tosubmit a pull request with your suggestions,open an issue on GitHub, orreach out to us.


[8]ページ先頭

©2009-2026 Movatter.jp