Hi Paul, You could also use DESCRIBE (https://drill.apache.org/docs/describe/).
0: jdbc:drill:drillbit=localhost:31010> describe `hive.default`.`integer_table` . . . . . . . . . . . . . . . . . . . > ; +--------------+--------------------+--------------+ | COLUMN_NAME | DATA_TYPE | IS_NULLABLE | +--------------+--------------------+--------------+ | keycolumn | CHARACTER VARYING | YES | | column1 | INTEGER | YES | +--------------+--------------------+-------- Best regards, Rob On Wed, Apr 25, 2018 at 10:12 PM, Abhishek Girish <[email protected]> wrote: > Hey Paul, > > You could use the typeof() function for this purpose. It takes a single > parameter - the column name. > > For example: > > select typeof(c_current_cdemo_sk) from customer limit 1; > +---------+ > | EXPR$0 | > +---------+ > | BIGINT | > +---------+ > 1 row selected (0.472 seconds) > > > On Wed, Apr 25, 2018 at 9:23 PM Paul Rogers <[email protected]> > wrote: > > > Hi All, > > Anyone know if there is a non-code way to display the data types of > > columns returned from a Drill query? Sqlline appears to only show the > > column names and values. The same is true of the Drill web console. > > The EXPLAIN PLAN FOR ... command shows the query plan, but not type > (which > > are only known at run time.) Is there a statement, system table or some > > other trick to display column types in, say, Sqlline? > > In the past, I've gotten the types by using unit test style code. But, > > that is not to handy for use as an example for non-developers... > > Thanks, > > - Paul > > > > >
