AnsweredAssumed Answered

Drill - working with obfuscated M7 column and column family names

Question asked by dominic on Oct 21, 2014
Latest reply on Oct 23, 2014 by dominic
I had a chat with folks at MapR about some of this at Strata last week, but now that I’ve had time to chew on it some more, I have a better idea of what I want to do.

Our M7 database uses compact column family and columns names for storage savings.    We have a schema dictionary we employ when querying through JCascalog, so the users can ask for columns by their verbose aliases.  We wish to allow SQL writers through Drill the same convenience.

The suggestion Ted gave is to use the standard SQL Parser, then manipulate the logical plan JSON file directly, making the needed substitutions to the obfuscated names. 

Question 1:  At what point do we programmatically intercept and modify the logical plan?    This would need to be done on the server side.    I assume there is a way to inject a pre or post processor that can manipulate all logical plans somehow? 

Question 2:  Once the query is returned, what is a good strategy to again turn the obfuscated names back into logical names?  Again, it would also be highly desirable to do this server-side, so BI tools connecting through ODBC can work as-is.