Skip to content

Add BigQuery -> ClickHouse SQL reference#6224

Open
Blargian wants to merge 6 commits into
ClickHouse:mainfrom
Blargian:bigquery-sql-reference
Open

Add BigQuery -> ClickHouse SQL reference#6224
Blargian wants to merge 6 commits into
ClickHouse:mainfrom
Blargian:bigquery-sql-reference

Conversation

@Blargian
Copy link
Copy Markdown
Member

@Blargian Blargian commented May 14, 2026

Summary

Adds a BigQuery to ClickHouse SQL reference guide

Checklist

@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

@Blargian is attempting to deploy a commit to the ClickHouse Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickhouse-docs Ready Ready Preview May 15, 2026 3:50pm

Request Review

Copy link
Copy Markdown
Collaborator

@dhtclk dhtclk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments (mostly British spellings)

Comment thread docs/cloud/onboard/02_migrate/01_migration_guides/03_bigquery/index.md Outdated
Co-authored-by: Dominic Tran <dominic.tran@clickhouse.com>
Comment thread docs/cloud/onboard/02_migrate/01_migration_guides/03_bigquery/index.md Outdated
Comment thread docs/cloud/onboard/02_migrate/01_migration_guides/03_bigquery/index.md Outdated
Blargian added 3 commits May 14, 2026 18:20
Co-authored-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
…e table notes to make it more clear they belong to the row above
| [`JSON`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#json_type) | [`JSON`](/sql-reference/data-types/newjson) &nbsp;or&nbsp; [`String`](/sql-reference/data-types/string) | `JSON` is preferred; `String` with [`JSONExtract*`](/sql-reference/functions/json-functions) accessors works as a fallback |
| [`NUMERIC`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types) | [`Decimal(P, S)`](/sql-reference/data-types/decimal) | Sized variants `Decimal32(S)` / `Decimal64(S)` / `Decimal128(S)` are also available |
| [`RANGE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#range_type) | No equivalent | Store `(start, end)` columns or a `Tuple(start, end)` |
| [`STRING`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#string_type) | [`String`](/sql-reference/data-types/string) | Optionally wrap in [`LowCardinality(String)`](/sql-reference/data-types/lowcardinality) for columns with few distinct values (enums, status codes, country codes). String functions are byte-based; the [String family](/sql-reference/functions/string-functions) has `UTF8` variants where relevant |
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: We should probably flag this as a performance optimization. This might be because I'm in dark mode but I didn't realize those data types were actually links.

<tr>
<td colSpan={2}>

Location is a service-level decision in ClickHouse Cloud.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: decision? maybe configuration?


## DDL statements {#ddl-statements}

### Schemas and databases {#ddl-schemas}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: missing the three part namespace callout

<tr>
<td colSpan={2}>

An engine and an `ORDER BY` are required for `MergeTree`-family tables; pick the columns that match the query access pattern. See [Sparse primary indexes](/guides/best-practices/sparse-primary-indexes).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: I think we need a sentence as to why order by is so crucial in clickhouse. it would make the partition comment make more sense. Also link out to what even is a mergetree

</tbody>
</table>

### Roles {#dcl-roles}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: I think this table is unnecessary - I think you could just do a sentence and link to the create role/user docs

</tbody>
</table>

### Pipe syntax {#pipe-syntax}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from Amy: you could just say we don't support this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants