apache / apache/datafusion-sqlparser-rs
snowflake column identifier for copy into / query data staged in files
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 772
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 17
Description
According to documentation, Snowflake allows:
* [query data staged in files](https://docs.snowflake.com/en/user-guide/querying-stage.html#required-parameters) with an identifier of a form `[.]$[.]`
* [copy into table](https://docs.snowflake.com/en/user-guide/data-load-transform.html) with an column identifier containing `$` character like `select t.$1,t.$2,t.$3 from @~/datafile.csv.gz t;`
Although the feature seems to be snowflake specific, it cannot be implemented within snowflake dialect. It's because tokens starting with `$` character are tokenized into `Token::Placeholder`. That's why parser's change is required.
Initial OpenLineage project issue: https://github.com/OpenLineage/OpenLineage/issues/814
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the lexer and parser handling tokens beginning with `$`, especially the path that currently produces `Token::Placeholder`, and review the Snowflake dialect handling. The work is done when the documented staged-file and COPY INTO column forms parse correctly without regressing existing placeholder syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- compilers, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100