Skip to content

Commit 3a25276

Browse files
committed
Added schema query for BigQuery
1 parent a5d9374 commit 3a25276

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,29 @@ WHERE
9696
ORDER BY 1, 2, 5
9797
```
9898

99+
#### BigQuery
100+
101+
```sql
102+
SELECT
103+
c.table_schema,
104+
c.table_name,
105+
c.column_name,
106+
c.data_type,
107+
c.ordinal_position
108+
FROM %PROJECT_NAME%.%DATASET_NAME%.INFORMATION_SCHEMA.COLUMNS c
109+
JOIN %PROJECT_NAME%.%DATASET_NAME%.INFORMATION_SCHEMA.TABLES t
110+
ON c.table_schema = t.table_schema
111+
AND c.table_name = t.table_name
112+
WHERE
113+
c.table_schema NOT IN ('INFORMATION_SCHEMA')
114+
ORDER BY
115+
c.table_schema,
116+
c.table_name,
117+
c.ordinal_position;
118+
```
119+
120+
:mag: Make sure to replace `%PROJECT_NAME%.%DATASET_NAME%` with proper values.
121+
99122
#### MySQL
100123

101124
```sql

0 commit comments

Comments
 (0)