Is there is any way to convert sql table schema to...
# general
m
Is there is any way to convert sql table schema to pinot table schema?
x
@Elon may have some idea 🙂
❤️ 2
e
Yes, we are open sourcing this. In prestosql you can create a pinot table directly.
❤️ 3
m
Awesome
p
Hi. How is this actually done? I have around 200 tables that I need to create in pinot. I only have a mysql schema of the entire database with me
e
Hey @Peer Mohamed Sharfaraz Baari - you would be able to do w create table for sure, but you can still do this in pinot directly until the pr is merged: you may need to determine some table configs like time column (not required but very strongly recommended), retention and can just map the types to pinot types. Also you may want to create indexes (star tree, inverted, etc.).
Maybe start w just simple sql type to pinot type mapping and create offline tables - then just curl the create table endpoint in the pinot controller.
i.e. varchar -> string int -> integer bigint -> long double -> double float -> float etc. lmk if you have any issues
p
Okay. Using this I come up with a script to convert SQL schema to json?