https://pinot.apache.org/ logo
#general
Title
# general
m

Mohammed Galalen

11/10/2020, 6:04 PM
Is there is any way to convert sql table schema to pinot table schema?
x

Xiang Fu

11/10/2020, 6:39 PM
@Elon may have some idea 🙂
❤️ 2
e

Elon

11/10/2020, 6:43 PM
Yes, we are open sourcing this. In prestosql you can create a pinot table directly.
❤️ 3
m

Mohammed Galalen

11/10/2020, 7:02 PM
Awesome
p

Peer Mohamed Sharfaraz Baari

09/16/2022, 4:49 AM
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

Elon

09/16/2022, 4:52 AM
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

Peer Mohamed Sharfaraz Baari

09/16/2022, 5:01 AM
Okay. Using this I come up with a script to convert SQL schema to json?