jose_escudero
05/31/2024, 3:40 PM_sdc_deleted_at
are available in the record.
Thus, the field that I'm mapping does not exist and I'm getting singer_sdk.exceptions.MapExpressionError: Failed to evaluate simpleeval expressions int(amount)
which makes sense since the field is not in the record which looks like {'id': '<redacted ID>', '_sdc_deleted_at': '2024-05-31T15:18:35.471584+00:00'}
The configuration looks like:
mappers:
- name: meltano-map-transformer
variant: meltano
pip_url: git+<https://github.com/MeltanoLabs/meltano-map-transform.git>
executable: meltano-map-transform
mappings:
- name: cast_amounts
config:
stream_maps:
public-my_table_name:
# Integers only
amount: int(amount)
Any ideas on how to work around these edge cases?Edgar Ramírez (Arch.dev)
05/31/2024, 3:48 PMamount: "int(record['amount']) if 'amount' in record else 0"
jose_escudero
05/31/2024, 3:52 PMEdgar Ramírez (Arch.dev)
05/31/2024, 3:54 PM