drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Givre <cgi...@gmail.com>
Subject Re: Table Metadata Question
Date Mon, 05 Dec 2016 01:55:55 GMT
That’s exactly what I was looking for.  I’m working on an adapter for a BI tool.  Is there
a way also see what type of storage plugin is being used?

> On Dec 4, 2016, at 20:54, Aman Sinha <amansinha@apache.org> wrote:
> 
> Charles,
> Drill does not have a metastore for tables, so unless you have defined a
> view with CAST or are querying Hive tables (Hive has a metastore),  the
> column types are determined at run-time.  Have you tried the typeof()
> function ?
>  SELECT  typeof(column) FROM dfs.`data.json` LIMIT 1;
> 
> 
> On Sun, Dec 4, 2016 at 8:47 AM, Charles Givre <cgivre@gmail.com> wrote:
> 
>> Hello all,
>> I’m trying to figure out if there is some way to determine what types of
>> columns a given data source contains.  It looks like this should exist in
>> the INFORMATION_SCHEMA somewhere, but I’m not clear how to do it.
>> 
>> For instance, let’s say that I have a file called data.json.  I could
>> execute:
>> SELECT *
>> FROM dfs.`data.json`
>> LIMIT 0
>> and get the column names, but is there some way to get at the data types
>> for these columns?
>> TIA,
>> — Charles


Mime
View raw message