Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get show create table in Big Query web UI

I want to get Create table script for an existing Table basically DDL from web UI or something similar to Show create table . I have googled couldn't find anything relevant

like image 946
nithin Avatar asked Nov 29 '18 13:11

nithin


People also ask

How do you see the query of a table in BigQuery?

Select BigQuery under which you will find Scheduled queries option,click on that. In the filter tab you can enter the keywords and get the required query of the table. Save this answer.


1 Answers

Cool news! Launched today, now you can get the DDL from INFORMATION_SCHEMA.TABLES

Here is the example from Google Documentation:

SELECT
 table_name, ddl
FROM
 `bigquery-public-data`.census_bureau_usa.INFORMATION_SCHEMA.TABLES
WHERE
 table_name="population_by_zip_2010"

enter image description here

like image 199
Murta Avatar answered Jan 03 '23 16:01

Murta