Search code examples
metadataimpaladescribe

Describe Impala Query Metadata


Is there a way of getting the metadata of a query?

I can use DESCRIBE but this only applies to tables, I don't really want to have to create a table from the query and get the metadata of that table as that would be unnecessarily expensive even if I limited the result rows.

I'm using impala shell to output queries to delimited files (usually only a couple of hundred rows) which are sometimes needed to be imported into an Access database.

I'd like to know the data types as then I can make Access use the correct data types rather than defaulting to string.


Solution

  • The answer, thanks to @SamsonScharfrichter is

    CREATE VIEW xxxx AS, then DESCRIBE xxxx, then DROP VIEW xxxx.