Hi Team Currently during the sync source schema is...
# replication-troubleshooting
m
Hi Team Currently during the sync source schema is inferred, is there a way to enforce a schema for a source? Is it possible to do from UI? How does the user generally enforce the source schema?
w
You can customize the connector, or use a view if its a database to try and change. It would be helpful if you mentioned what connector you're using. Some sources allow some degree of modifying the schema (restricting certain fields, tables, etc.) but thats connector dependent. You could certainly build that type of functionality by altering the spec.json/yaml file to allow a user to enter a schema and then changing discover and read functions to handle using that schema, Schemas are identified in the discover step. The schema is what it is, Airbyte in most sources makes the best attempt at mapping the underlying source data types to those that adhere to the json schema typing restrictions. If youre hoping to carry across something like a datetime, you wont be able to. That is something you could handle with custom DBT transformations or transformations directly in the destination after its been loaded.
m
Thank you @Walker Philips for the detailed explanation. I was working with mongodb and date time types. I am not exploring this part at the moment.