Hey Omar,

If you have configured your S3 bucket in a workspace named
"s3-drill-tempalert-demo.root",
you could query in the following two ways:

(1) use `s3-drill-tempalert-demo`.`root`;  *// default schema changed*
     show files; *// should list "test.json" file*
     select * from `test.json`; *// file name relative to the workspace*

OR

(2) select * from dfs.`s3-drill-tempalert-demo`.`root`.`/test.json`;  *//
query file directly from the specified schema*

Can you try this and let me know if it works?

-Abhishek

On Sun, Jun 14, 2015 at 6:16 PM, Subrat Basnet <[email protected]> wrote:

> Which region of S3 are you using?
>
> Eu-central-1 did not work for me and had same issues. No idea why.
>
> When I put the bucket in Ireland or US west, it worked beautifully.
>
> Sent from my iPhone
>
> > On Jun 15, 2015, at 2:31 AM, Omar Baba <[email protected]> wrote:
> >
> > I followed instructions from
> >
> http://drill.apache.org/blog/2014/12/09/running-sql-queries-on-amazon-s3/
> > to configure s3 plugin on an embedded drill instance.  I have one file,
> > test.json, in my s3 bucket.  It seems that drill is able to connect to
> the
> > s3 bucket but unable to "see" test.json file on it.
> >
> > 0: jdbc:drill:zk=local> show schemas;
> >
> > *+----------------------------------+*
> >
> > *| **          SCHEMA_NAME           ** |*
> >
> > *+----------------------------------+*
> >
> > *| *INFORMATION_SCHEMA              * |*
> >
> > *| *cp.default                      * |*
> >
> > *| *dfs.default                     * |*
> >
> > *| *dfs.ob-tes                      * |*
> >
> > *| *dfs.root                        * |*
> >
> > *| *dfs.tmp                         * |*
> >
> > *| *s3-drill-tempalert-demo.default * |*
> >
> > *| *s3-drill-tempalert-demo.root    * |*
> >
> > *| *sys                             * |*
> >
> > *+----------------------------------+*
> >
> > 0: jdbc:drill:zk=local> use `s3-drill-tempalert-demo`.`root`;
> >
> > *+-------+-----------------------------------------------------------+*
> >
> > *| ** ok  ** | **                         summary
>  **
> > |*
> >
> > *+-------+-----------------------------------------------------------+*
> >
> > *| *true * | *Default schema changed to [s3-drill-tempalert-demo.root] *
> |*
> >
> > *+-------+-----------------------------------------------------------+*
> >
> > 1 row selected (0.076 seconds)
> >
> > 0: jdbc:drill:zk=local> select * from dfs.`/test.json`;
> >
> > Jun 14, 2015 4:43:32 PM
> > org.apache.calcite.sql.validate.SqlValidatorException <init>
> >
> > SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Table
> > 'dfs./test.json' not found
> >
> > Jun 14, 2015 4:43:32 PM org.apache.calcite.runtime.CalciteException
> <init>
> >
> > SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1,
> > column 15 to line 1, column 17: Table 'dfs./test.json' not found
> >
> > *Error: PARSE ERROR: From line 1, column 15 to line 1, column 17: Table
> > 'dfs./test.json' not found*
> >
> >
> >
> > *[Error Id: 21fe88be-e60a-451a-9abe-32ea3c27ce70 on 192.168.2.110:31010
> > <http://192.168.2.110:31010>]*
> >
> >
> > *  (org.apache.calcite.tools.ValidationException)
> > org.apache.calcite.runtime.CalciteContextException: From line 1, column
> 15
> > to line 1, column 17: Table 'dfs./test.json' not found*
> >
> > I've also tried the following queries, but got the same error:
> > select * from dfs.`/test.json`;
> >
> > What am I doing wrong? Is s3 not supported on embedded drill?
> >
> > Omar
>

Reply via email to