- Newest
- Most votes
- Most comments
This issue appears to be related to how AWS DMS handles string data types during transformations when migrating from DocumentDB to S3 in table format (CSV).
When AWS DMS processes data type conversions, it can sometimes replace values with NULL if they can't be properly converted to the target data type. In your case, while the integer field is being correctly transformed, the string field is being treated as NULL in the derived column.
There are a few potential solutions to try:
-
You could try prefixing your source column name with "json_" in your transformation rule to coerce the data type. For example, instead of using "$phase" in your expression, you might try "$json_phase". This tells DMS to treat the field as a JSON object rather than a simple string.
-
Check the CsvNullValue setting in your S3 target endpoint settings. This parameter specifies how AWS DMS treats null values when writing to the target. By default, it's set to "NULL", but you can customize it to differentiate between empty strings and null values.
-
If your string contains special characters or JSON formatting, you might need to use a different approach to extract the string value properly in your transformation expression.
-
Consider using a different data type in your transformation rule. While you've specified "string" with length 256, you might try adjusting these parameters or using a different data type.
The fact that the original "phase" column is correctly populated in the output while the derived "newPhaseValue" column is NULL suggests that there's an issue specifically with how the transformation expression is handling the string data from DocumentDB.
Sources
S3Settings - AWS Database Migration Service
Using Amazon DocumentDB as a target for AWS Database Migration Service - AWS Database Migration Service
CHANGE_DATA_TYPE - AWS Glue DataBrew
answered a year ago
Relevant content
asked 6 months ago
asked 3 years ago
- AWS OFFICIALUpdated 3 years ago
