drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Givre <cgi...@gmail.com>
Subject Re: Querying json files from multiple subdirectories
Date Fri, 17 Jan 2020 14:31:42 GMT
Hi there,
If you have that directory structure, the following query should work:

SELECT *
FROM dfs.<workspace>.`transactions/` as t1

Obviously replacing <workspace> with your workspace.  You can then join that with anything
that Drill can query. 
Best,
-- C



> On Jan 17, 2020, at 1:27 AM, Prabhakar Bhosaale <bhosale.p.v@gmail.com> wrote:
> 
> Hi All,
> 
> I am new to apache drill and trying to retrieve data from json files by
> querying the directories.
> 
> The directory structure is
> 
>                        |------>Year2012--->trans.json
>                        |
>                        |
> transactions-->|
>                        |
>                        |------>Year2013--->trans.json
> 
> I would like to query trans.json from both the sub-directories as one table
> and then join the resultant table with another table in a single query.
> Please help with possible options. thx
> 
> Regards


Mime
View raw message