drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Sinha <amansi...@apache.org>
Subject Re: Table Metadata Question
Date Mon, 05 Dec 2016 01:54:20 GMT
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:
> FROM dfs.`data.json`
> and get the column names, but is there some way to get at the data types
> for these columns?
> TIA,
> — Charles

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message