Reputation: 477
I am unable to get the last column value Any suggestions, Selecting columns[2] or the last column name does not work
I have the text file as
PolicyID~Name~AccountID
1~ABC Holdings~12
2~XYZ Insurance~2
When i do a Select * from dfs.root it works
When i do either AccountID or columns[2] i get an error.
How do i query the last column in drill?..I get the following error when i query the last column
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: IndexOutOfBoundsException: index: 32384, length: 4 (expected: range(0, 16384)) Fragment 0:0 [Error Id: dba982b9-0517-4ab2-a61f-dbf737c253da on 10.100.94.28:31010]
Upvotes: 1
Views: 358
Reputation: 11
You will need to set up a new dfs configuration.
If you are using Drill on docker (https://drill.apache.org/docs/running-drill-on-docker/), here are the steps:
Storage
option at the top of the webpage, or go to this url: http://localhost:8047/storageupdate
button on the "Enabled Storage Plugins" section"txt": {
"type": "text",
"extensions": [
"txt"
],
"lineDelimiter": "\n",
"fieldDelimiter": "~",
"quote": "\"",
"escape": "\"",
"comment": "#",
"extractHeader": true
},
SELECT AccountID FROM dfs.`/data/text/*.txt`;
Upvotes: 1