timothy_suh
09/23/2020, 11:09 AMdouwe_maan
09/23/2020, 2:54 PMSCHEMA output by the tap, the LastLoginDate property is defined as having either type A or type B (anyOf: [a, b]) which is not supported by target-postgres since a database column can only have one type: https://github.com/meltano/target-postgres/blob/master/target_postgres/db_sync.py#L81
Can you find out what the type of LastLoginDate looks like by running meltano elt in debug mode (meltano --log-level=debug elt ... ) and sharing the offending SCHEMA message?
Depending on what the anyOf type looks like exactly, we may be able to override it with a single type in the catalog file using the schema extra: https://meltano.com/docs/plugins.html#schema-extratimothy_suh
09/24/2020, 5:14 PMdouwe_maan
09/24/2020, 5:23 PMtap-postgres is tripping over the fact that the second option repeats the string type.
This would've been fine:
"LastLoginDate": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}]}
You can tell Meltano to override the schema for the LastLoginData property in the catalog file it passes to tap-salesforce (which it hopefully uses to generate its SCHEMA messages), like this (with the correct entity/stream ID):
meltano config tap-salesforce set _schema <stream ID> LastLoginDate anyOf '[{"type": "string", "format": "date-time"}, {"type": "null"}]'douwe_maan
09/24/2020, 5:24 PMmeltano.yml , the result of that will look something like this: https://meltano.com/docs/plugins.html#in-meltano-yml-4timothy_suh
09/24/2020, 5:30 PMdouwe_maan
09/24/2020, 5:30 PMDate , you should be able to use * as the entity identifier, and *Date as the attribute identifier, to catch all properties at once!douwe_maan
09/24/2020, 5:31 PMmeltano config tap-salesforce set _schema '*' '*Date' anyOf '[{"type": "string", "format": "date-time"}, {"type": "null"}]'timothy_suh
09/24/2020, 5:34 PMtimothy_suh
09/24/2020, 6:42 PMdouwe_maan
09/24/2020, 6:47 PM