metabase / metabase/macaw

BigQuery backtick-quoted identifiers not split into schema and table

Open
#130 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
23
Forks
4
PR merge metrics
No merged PRs in 30d

Description

When parsing BigQuery SQL, backtick-quoted identifiers like `` `dataset.table` `` are returned as a single table name with `nil` schema, rather than being split into schema and table components.

Example

```sql
SELECT * FROM `my_dataset.my_table`

Current behavior

{:schema nil, :table "my_dataset.my_table"}

Expected behavior

{:schema "my_dataset", :table "my_table"}
```

Context

In BigQuery, backticks are used to quote identifiers, and `dataset.table` is the standard way to reference a fully-qualified table. Unlike standard SQL where a quoted identifier like "foo.bar" would be a single identifier containing a literal dot, BigQuery's backtick quoting preserves the dot as a separator between dataset (schema) and table.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the BigQuery SQL parsing code and any existing tests for identifier splitting. Reproduce the example, then verify that a backtick-quoted dataset.table produces separate schema and table values while preserving the expected behavior for other identifiers.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.