luke_otterblad
08/10/2023, 2:17 PMstream_maps:
user_email: user_email or ''
user_gender: user_gender or ''
Around 1-2% of documents do not have one or another of these fields. The issue is that if I don't include a stream maps I get an error on ingestion "json.schema.exceptions.ValidaitonError", 'user_email' is a required property
If I do include stream maps, once it actually gets the the document it throws a "singer_sdk.helpers._simpleeval.NameNotDefined"
I think this is because in simpleeval
>> simple_eval("user_email or ''", names={"user_email": "<mailto:test@example.com|test@example.com>"})
--> looks like this on good documents, but I'm assuming doesn't get a defined names field on documents where the key doesn't exist
Is there any way to have a meltano stream map set a default value if a key doesn't exist but use the existing value if it does?pat_nadolny
08/10/2023, 2:34 PMipv4prefix
or ipv6prefix
in the input records but I always want both of them. I renamed them in mine but you should be able to just do ipv4prefix: record.get('ipv4prefix', '')
or user_email: record.get('user_email', '')
luke_otterblad
08/10/2023, 2:38 PMmark_estey
08/10/2023, 6:43 PMstream_maps:
user_email: record.get('user_email', '')
user_gender: record.get('user_gender', '')
mark_estey
08/10/2023, 6:46 PM