Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option to preserve the source data type for S3 output format… #27616

Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ENHANCEMENTS:
* resource/aws_network_interface_attachment: Added import capabilities for the resource ([#27364](https://github.com/hashicorp/terraform-provider-aws/issues/27364))
* resource/aws_sesv2_dedicated_ip_pool: Add `scaling_mode` attribute ([#27388](https://github.com/hashicorp/terraform-provider-aws/issues/27388))
* resource/aws_ssm_parameter: Support `aws:ssm:integration` as a valid value for `data_type` ([#27329](https://github.com/hashicorp/terraform-provider-aws/issues/27329))
* resource/aws_appflow_flow: Add support for preserving source data types in the S3 output config ([#26372](https://github.com/hashicorp/terraform-provider-aws/issues/26372))

BUG FIXES:

Expand Down
16 changes: 16 additions & 0 deletions internal/service/appflow/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ func ResourceFlow() *schema.Resource {
},
},
},
"preserve_source_data_typing": {
Type: schema.TypeBool,
Optional: true,
},
},
},
},
Expand Down Expand Up @@ -610,6 +614,10 @@ func ResourceFlow() *schema.Resource {
},
},
},
"preserve_source_data_typing": {
Type: schema.TypeBool,
Optional: true,
},
},
},
},
Expand Down Expand Up @@ -1720,6 +1728,10 @@ func expandS3OutputFormatConfig(tfMap map[string]interface{}) *appflow.S3OutputF
a.PrefixConfig = expandPrefixConfig(v[0].(map[string]interface{}))
}

if v, ok := tfMap["preserve_source_data_typing"].(bool); ok {
a.PreserveSourceDataTyping = aws.Bool(v)
}

return a
}

Expand Down Expand Up @@ -2824,6 +2836,10 @@ func flattenS3OutputFormatConfig(s3OutputFormatConfig *appflow.S3OutputFormatCon
m["prefix_config"] = []interface{}{flattenPrefixConfig(v)}
}

if v := s3OutputFormatConfig.PreserveSourceDataTyping; v != nil {
m["preserve_source_data_typing"] = aws.BoolValue(v)
}

return m
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/appflow_flow.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ EventBridge, Honeycode, and Marketo destination properties all support the follo
* `aggregation_config` - (Optional) Aggregation settings that you can use to customize the output format of your flow data. See [Aggregation Config](#aggregation-config) for more details.
* `file_type` - (Optional) File type that Amazon AppFlow places in the Amazon S3 bucket. Valid values are `CSV`, `JSON`, and `PARQUET`.
* `prefix_config` - (Optional) Determines the prefix that Amazon AppFlow applies to the folder name in the Amazon S3 bucket. You can name folders according to the flow frequency and date. See [Prefix Config](#prefix-config) for more details.
* `preserve_source_data_typing` - (Optional, Boolean) Whether the data types from the source system need to be preserved (Only valid for `Parquet` file type)

##### Salesforce Destination Properties

Expand Down