<@U04S8PLJWMT> Running an airbyte terraform script...
# ask-ai
a
@kapa.ai Running an airbyte terraform script. Sources and destinations are configured correctly (source is msql and destination is postgres). However the script appears to ignore the stream configurations. Here is an example:
configurations = {
streams = [
{
name = "users"
sync_mode = "incremental_deduped_history"
cursor_field = [
"_ab_cdc_cursor"
]
primary_key = [
[
"userid"
]
]
}
]
}
k
Based on the information in the knowledge sources, there are a few important points to consider regarding your Airbyte Terraform script and the use of the sync mode incremental_deduped_history with a MySQL source and a Postgres destination: 1. Sync Mode Support: The sync mode incremental_deduped_history (also referred to as Incremental | Append + Deduped) is not universally supported across all Airbyte destinations. Specifically, there is evidence that this mode is not supported for MySQL as a destination, and there have been user reports and confirmations from Airbyte support that it was never enabled for MySQL destinations, despite some documentation errors in the past. However, your setup uses MySQL as a source and Postgres as a destination, which is a supported combination for this sync mode, as long as the destination supports it (Postgres does) and the source can provide the necessary cursor and primary key fields [Is Sync mode Incremental - Deduped History supported for mysql destination connector](https://discuss.airbyte.io/t/632) [Add append_dedupe feature for the MySQL destination](https://github.com/airbytehq/airbyte/issues/14822). 2. Terraform and API Support: There have been issues reported where the Airbyte API and Terraform provider did not support certain sync modes, or the configuration was ignored. Some users have found that upgrading the Terraform provider version resolved the issue, but others still encountered problems with the sync mode not being recognized or applied. The accepted values for sync_mode in the API and Terraform provider are limited, and if an unsupported value is used, it may be ignored or cause errors [Airbyte API doesn't support the "Full Refresh - Overwrite + Deduped" sync mode when creating connections](https://github.com/airbytehq/airbyte/issues/52142). 3. Configuration Format: Ensure that your Terraform configuration matches the expected format for the provider version you are using. The sync_mode value should be one of the accepted values (e.g., incremental_deduped_history for Incremental | Append + Deduped). If the provider or Airbyte instance does not recognize this value, it will ignore the configuration or default to another mode. Recommendations: - Double-check that you are using a recent version of the Airbyte Terraform provider that supports the sync mode incremental_deduped_history. - Verify that your Airbyte instance and connectors (MySQL source, Postgres destination) are up to date and support this sync mode. - If the configuration is still being ignored, review the Airbyte UI after applying the Terraform script to see what sync mode is actually set for the stream. - If issues persist, consult the provider documentation and consider opening an issue with details about your provider version and configuration. Summary: Your configuration appears correct for a supported source/destination pair, but if the sync mode is being ignored, it is likely due to limitations or bugs in the Airbyte Terraform provider or API. Upgrading the provider and verifying compatibility is recommended. If the problem continues, it may be necessary to configure the connection manually in the Airbyte UI or report the issue to the Airbyte team [Airbyte API doesn't support the "Full Refresh - Overwrite + Deduped" sync mode when creating connections](https://github.com/airbytehq/airbyte/issues/52142) [Add append_dedupe feature for the MySQL destination](https://github.com/airbytehq/airbyte/issues/14822).
a
@kapa.ai can you show an actual example of a working connection configurations.streams where source is MsSQL and destination is Postgres?
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain an explicit, complete example of a working
configurations.streams
block for a Terraform Airbyte connection where the source is MsSQL and the destination is Postgres. The available documentation and tutorials show general patterns for configuring connections and streams, but do not include a concrete, full example for this specific source/destination pair. The closest available examples use other sources (like Stripe, Postgres, or MySQL) and destinations (like BigQuery or Postgres), and they demonstrate the general structure for defining streams and sync modes in Terraform, but not specifically for MsSQL to Postgres. For example:
Copy code
hcl resource "airbyte_connection" "stripe_to_bigquery" {       name           = "Stripe to BigQuery"       source_id      = airbyte_source_stripe.my_source_stripe.source_id       destination_id = airbyte_destination_bigquery.my_destination_bigquery.destination_id       # Stream configurations would go here }
[Terraform provider documentation](https://docs.airbyte.com/platform/1.6/terraform-documentation#step-4-create-a-connection) If you need a template, you can adapt the general structure, but you will need to refer to the [Terraform provider reference](https://registry.terraform.io/providers/airbytehq/airbyte/latest/docs/resources/connection) and ensure your stream names, sync modes, and fields match your actual MsSQL source and Postgres destination schemas. Summary: There is no MsSQL-to-Postgres-specific
configurations.streams
example in the knowledge sources. Please consult the official Airbyte Terraform provider documentation for the most up-to-date and detailed configuration options.