Bigquery query to find the column names of a table

前端 未结 6 804
误落风尘
误落风尘 2021-01-17 08:59

I need a query to find column names of a table (table metadata) in Bigquery, like the following query in SQL:

SELECT column_name,data_type,data_length,data_p         


        
6条回答
  •  一整个雨季
    2021-01-17 09:27

    Update: This is now possible! See the INFORMATION SCHEMA docs and the answers below.

    Answer, circa 2012:

    It's not currently possible to retrieve table metadata (i.e. column names and types) via a query, though this isn't the first time it's been requested.

    Is there a reason you need to do this as a query? Table metadata is available via the tables API.

提交回复
热议问题