Re: extractHeader in session variable?

2016-02-29 Thread Christopher Matta
Ah, thanks Jason, that worked: 0: jdbc:drill:> select * from TABLE(maprfs.cmatta.`weather/data/PHL/2012/1/data.csv` (type => 'text', extractHeader => true, fieldDelimiter => ',')) limit 10; +---+---++---+-++---

Re: extractHeader in session variable?

2016-02-29 Thread Jason Altekruse
You need to specify the delimiter, it doesn't seem to default to comma as the field delimiter. On Mon, Feb 29, 2016 at 11:46 AM, Christopher Matta wrote: > Actually I spoke too soon. > > Running what Jacques suggested returned a single column for all the data, > with all the headers smashed toge

Re: extractHeader in session variable?

2016-02-29 Thread Christopher Matta
Actually I spoke too soon. Running what Jacques suggested returned a single column for all the data, with all the headers smashed together: 0: jdbc:drill:> select * from TABLE(maprfs.cmatta.`weather/data/PHL/2012/1/data.csv` (type => 'text', extractHeader => true)) limit 10; +

Re: extractHeader in session variable?

2016-02-29 Thread Christopher Matta
Thanks Jacques, that worked. Chris Matta cma...@mapr.com 215-701-3146 On Sat, Feb 27, 2016 at 1:01 PM, Jacques Nadeau wrote: > You should use select with options. > > Examples are here: > https://drill.apache.org/blog/2015/12/14/drill-1.4-released/ > > E.g.: > > SELECT * FROM TABLE(dfs.`/path/t

Re: extractHeader in session variable?

2016-02-27 Thread Jacques Nadeau
You should use select with options. Examples are here: https://drill.apache.org/blog/2015/12/14/drill-1.4-released/ E.g.: SELECT * FROM TABLE(dfs.`/path/to/CO.dat`(type => 'text', extractHeader => true)); -- Jacques Nadeau CTO and Co-Founder, Dremio On Fri, Feb 26, 2016 at 12:38 PM, Christophe

extractHeader in session variable?

2016-02-26 Thread Christopher Matta
Is it possible to set the extractHeader option for CSV/TSV in a session variable? Doing it on the format type is just too broad sometimes and I'd like to be able to set it based on the files I'm querying. Chris Matta cma...@mapr.com 215-701-3146