drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andries Engelbrecht <aengelbre...@maprtech.com>
Subject Re: Unable to query data from hdfs
Date Wed, 08 Apr 2015 15:50:39 GMT
Not sure why your extensions in the SP is not working correctly.

It is interesting to see that sometime you can query the test.csv file and other times not.
What changed between those?

Also _ should not be an issue in the name. And the DIM_Agents is a directory, so Drill will
check the directory path for files. What files are in the directory?

You might also want to check the file and directory permissions to verify it matches to the
SP permissions (r/w).

—Andries

On Apr 8, 2015, at 7:59 AM, Sivasubramaniam, Latha <Latha.Sivasubramaniam@Aspect.com>
wrote:

> Hi,
> 
> Thanks for your responses. Even though I had done use hdfs, only when I fully qualified
the file name it worked. But I am not able to access files without .csv extension.
> 
> I modified
> 
> "csv": {
>      "type": "text",
>      "extensions": [
>        "csv"
>      ],
>      "delimiter": ","
> 
> To
> 
> "csv": {
>      "type": "text",
>      "extensions":  null,
>      "delimiter": ","
> 
> And tried to access hdfs file 'DIM_Agents' and I get the same error. With null extensions,
I can't access 'test.csv' also, once I reverted back csv format description then I could access
test.csv again, but I cannot access other files with either of the format descriptions.
> 
> Below are what I tried. Is '_'  (underscore) a problem in the file name. All my hdfs
files are in text format.
> 
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/test.csv`;
> +------------+------------+
> |  columns   |    dir0    |
> +------------+------------+
> | ["1","Latha"] | root       |
> | ["2","Roshan"] | root       |
> +------------+------------+
> 2 rows selected (0.276 seconds)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/DIM_Agents`;
> Query failed: SqlValidatorException: Table 'hdfs.root./DIM_Agents' not found
> 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/DIM_Agents`;
> Query failed: SqlValidatorException: Table 'hdfs.root./DIM_Agents' not found
> 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/test.csv`;
> Query failed: SqlValidatorException: Table 'hdfs.root./test.csv' not found
> 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/DIM_Agents`;
> Query failed: SqlValidatorException: Table 'hdfs.root./DIM_Agents' not found
> 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/test.csv`;
> Query failed: SqlValidatorException: Table 'hdfs.root./test.csv' not found
> 
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=rtr-poc-imp1:2181> select * from hdfs.root.`/test.csv`;
> +------------+------------+
> |  columns   |    dir0    |
> +------------+------------+
> | ["1","Latha"] | root       |
> | ["2","Roshan"] | root       |
> +------------+------------+
> 2 rows selected (0.112 seconds)
> 
> Appreciate your help.
> 
> Thanks,
> Latha
> This email (including any attachments) is proprietary to Aspect Software, Inc. and may
contain information that is confidential. If you have received this message in error, please
do not read, copy or forward this message. Please notify the sender immediately, delete it
from your system and destroy any copies. You may not further disclose or distribute this email
or its attachments.


Mime
View raw message