Convert json data into DDL
A simple json to DDL tool, very useful when doing ETL.
Currently supported json and database type relationships:
json | DDL |
---|---|
number | bigint |
string | varchar |
boolean | tinyint |
Date | datetime |
Array object |
json |
null undefined |
null |
other | undefined |
It currently has some built-in basic rules:
- If an attribute is of json type, the corresponding database type is longtext
- Other types will be converted to String first, and then *2 is the length of the database type
- The decimal type in json (such as:
1.23
) corresponds to thevarchar
type in DDL