Fork me on GitHub
#instaparse
<
2015-10-14
>
aaelony22:10:25

has anyone tried parsing between sql flavors? For example make a Redshift legal sql query a Hive legal sql query, assuming identical table and column names ? Would instaparse be a good fit for this kind of translation?

aengelberg22:10:30

I'm not familiar with the differences of Redshift and Hive formats; how many gotchas are there when going between the two styles?

aaelony23:10:16

there are differences in data types in create table statements, there are also differences in syntax and function calls

aaelony23:10:03

just trying to gauge if such translations are a good fit to try in instaparse

aengelberg23:10:10

Instaparse's job is to fully parse a string and return its meaning as a tree of data. If you need to fully parse a sql query and examine the data before you know what to do with it, Instaparse is a good choice. But if the problem could be solved by a regular expression searching the string for patterns, Instaparse might be overkill.