Summary
In the
source-amazon-seller-partner
connector code (Python), the user wants to validate the data schema before passing it to the destination. They are specifically looking to ensure that the read data fits the schema defined in the connector for theget_vendor_sales_report
stream. The user is considering using the jsonschemavalidate
function but is seeking advice on the best approach or if there are existing functions or examples available.
Question
Hello everyone! In source-amazon-seller-partner
connector code (Python) I wanted to make a small change that before passing data to the destination checks if the read data fits the schema (properties
in stream describing json
file).
I wanted to do this because there is a problem in the schema of read data and schema written in the connector for stream: get_vendor_sales_report
(format of date vs date-time fields) and instead of trial and error on migration process I wanted to have a programatic way of saying that what we collect from source 100% fits the schema if that is easy do implement.
I was thinking of using jsonschema validate
function. But perhaps there is a better way of doing this. Does anyone know how to do this best, perhaps there is an existing built in function that can be used or there is an existing example of how this can be done?
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.