I have a mutating JSON (structure of the JSON changes all the time) that I have flattened into several data frames. Now I need to load those data frames into my staging tables in Redshift. Because the JSON structure changes all the time, the number of data frames and the structure of the data frames changes all the time. So it will be convenient if I can extract the schema of each data frames, build 'create table' statements, run them in the database before loading the data frames into the staging tables. How do I dynamically convert the data frame schema to create table statements.
If anyone know any other easy way to do please let me know. Im using Python.