Other: Connector SDK Improvement Request
AnsweredPlease extend the fivetran_connector_sdk.Operations.upsert (table=”three”, data=data) method with an additional optional parameter allowing to pass a default deserializer method similar to json.dumps() default parameter. Currently, when uncommon classes are encountered upsert() fails. The only workaround I could think of is first serialize and then re-deserialize the object.
yield op.upsert(table='table_name', data=json.loads(json.dumps(data, default=lambda o: o.__dict__)))
This ads unnecessary strain on compute. It would be much cleaner to pass default=lambda o: o.__dict__ as a parameter to upsert operation.
-
Official comment
Hi David,
Thank you so much for sharing your suggestion with us! We really appreciate hearing from our users. To help us better understand your needs, could you share a bit more detail about the specific source that is presenting this problem and requiring the workaround you describe? The more context we have, the better we can evaluate and prioritize your request.
Looking forward to your response!
Best regards,
Alison Kline
Please sign in to leave a comment.
Comments
1 comment