instaparse

If you're not trampolining your parser, why bother getting up in the morning?
2015-10-14T22:23:25.000004Z

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?

aengelberg 2015-10-14T22:38:30.000005Z

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

aengelberg 2015-10-14T22:44:10.000006Z

@aaelony: ^

2015-10-14T23:23:16.000007Z

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

2015-10-14T23:24:03.000008Z

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

aengelberg 2015-10-14T23:47:10.000009Z

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.