It only works with SQLite, but my sqlite-utils Python library works a bit like that: you can feed it JSON objects and it will create a table schema to match: https://sqlite-utils.datasette.io/en/stable/python-api.html#...
It has a CLI tool as well: https://sqlite-utils.datasette.io/en/stable/cli.html#inserti...