Have you looked at what Drill does in this way? In particular, it has workspaces which could plausibly look at environment variables to introduce a home directory path.
In fact, is there a strong reason not to use Drill for this? On Sun, Apr 24, 2016 at 3:47 AM, Rahul Raj <[email protected]> wrote: > We are building a UI application where users can login and query files > placed on their respective "home folders". A java application server > maintains user information and connects to drill to execute queries. The > files are persisted on a mounted disk, each user having a separate folder. > The app server modifies the user queries to add the user 'home folder' > name. > > If user1 issues 'select * from /path/to/file1.csv', it must get mapped to > 'select * from /mnt/users/user1/path/to/file1.csv' > For user2 query 'select * from /path/to/file1.csv', should map to 'select > * from /mnt/users/user2/path/to/file1.csv' > > I am trying to embed calcite in the server application and map the queries. > I tried some examples using calcite, but could not proceed much. > > Rahul > > > > > On Sun, Apr 24, 2016 at 12:30 AM, Ted Dunning <[email protected]> > wrote: > > > When you say translate, do you mean to have the query translated by magic > > somehow? Are there constraints you didn't mention? > > > > Without more context it might be a bit hard to avoid answering with > obvious > > answers like using a text editor or by putting symbolic paths in your > file > > system, but presumably, you have tried these. > > > > > > > > On Sat, Apr 23, 2016 at 11:09 AM, Rahul Raj <[email protected]> wrote: > > > > > Yes. We have introduced some bookkeeping functionality and is backed by > > > drill. > > > On Apr 23, 2016 12:12, "Julian Hyde" <[email protected]> wrote: > > > > > > > Are you running Drill by any chance? That syntax looks similar to > > Drill’s > > > > syntax for querying files. > > > > > > > > > On Apr 22, 2016, at 8:27 PM, Rahul Raj <[email protected]> wrote: > > > > > > > > > > Asking for help in this group as I could not figure out much from > the > > > > > examples provided. > > > > > > > > > > I need to translate a query like: 'select * from /path/to/my_table' > > to > > > > > > > > > > 'select * from /path/to/mount/my_table', where the query could be > any > > > > valid > > > > > sql. > > > > > > > > > > Rahul > > > > > > > > > > > > > > > > > -- > <a href="http://www.spreadfirefox.com/?q=affiliates&id=0&t=1"><textarea > rows="3" cols="40"><a href=" > http://www.spreadfirefox.com/?q=affiliates&id=0&t=1">Get Firefox!</a> >
