BIGQUERY - SHOW TABLE table_name

I asked Gemini the following:

I want to see the DDL for a given table in bigquery

And I received this for an answer:

To see the DDL for a given table in BigQuery, you can use the following steps:
Open the BigQuery web UI and navigate to the dataset that contains the table.
Click on the table name to open the table details page.
Click on the "Edit" button in the top right corner of the page.
In the "Definition" tab, you will see the DDL for the table.
Here is an example of the DDL for a table called my_table :
CREATE TABLE `my_project.my_dataset.my_table` (
  `name` STRING,
  `age` INTEGER,
  `gender` STRING
)
Generated code may be subject to license restrictions not shown here. Use code with care. Learn more 

You can also use the SHOW CREATE TABLE statement to get the DDL for a table. For example, the following query will return the DDL for the my_table table:
SHOW CREATE TABLE `my_project.my_dataset.my_table`
Generated code may be subject to license restrictions not shown here. Use code with care. Learn more 

The output of the query will be the DDL for the table.

I've tried those instructions with no luck. Wasn't supposed that Gemini have general knowledge about Google Cloud?

Screenshot 2024-04-10 at 12.28.30.png

Anyway, I went to Google Search to find a correct answer to my problem. What I want to do is something like Teradata has, the ability to display the DDL of a given table by running the following command:

SHOW TABLE table_name

In such database you also have a statement to get a nice and neat table with column information for a given table. This allows easy copy and paste so you can do other stuff quickly with that information in, let's say, a spreadsheet. That command is:

HELP TABLE table_name

That would help saving time instead of going through the INFORMATION_SCHEMA.TABLES view.

When you work with Data Warehouses all day, you appreciate these kinds of things. Bigquery is a very good product, but sometimes I feel like it makes things unnecessarily complicated for me.

--
Best regards
David Regalado
Web | Linkedin | Cloudskillsboost

5 0 118
0 REPLIES 0