Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing Redshift SQL #75

Open
phil-bergmann opened this issue Jun 1, 2023 · 0 comments
Open

Error parsing Redshift SQL #75

phil-bergmann opened this issue Jun 1, 2023 · 0 comments

Comments

@phil-bergmann
Copy link

Error when parsing the following SQL:

BEGIN TRANSACTION;

UNLOAD ('
SELECT
    tl.apartment_id AS apartment_id,
    tl.clicks AS delta_clicks
FROM ranking_team.rl_impressions_to_learn_enriched tl
')
TO '{{ params.s3_bucket }}'
IAM_ROLE '{{ params.iam_role }}'
PARQUET PARTITION BY (apartment_id, delta_clicks)
ALLOWOVERWRITE;
    
END TRANSACTION;

Error:

source_file [0, 0] - [14, 0])
  ERROR [0, 0] - [2, 9])
    ERROR [0, 0] - [0, 3])
    ERROR [0, 6] - [0, 15])
    ERROR [2, 0] - [2, 6])
  select_statement [3, 0] - [10, 48])
    select_clause [3, 0] - [5, 29])
      select_clause_body [4, 4] - [5, 29])
        alias [4, 4] - [4, 35])
          dotted_name [4, 4] - [4, 19])
            identifier [4, 4] - [4, 6])
            identifier [4, 7] - [4, 19])
          identifier [4, 23] - [4, 35])
        alias [5, 4] - [5, 29])
          dotted_name [5, 4] - [5, 13])
            identifier [5, 4] - [5, 6])
            identifier [5, 7] - [5, 13])
          identifier [5, 17] - [5, 29])
    from_clause [6, 0] - [10, 48])
      ERROR [6, 5] - [10, 20])
        alias [6, 5] - [6, 53])
          dotted_name [6, 5] - [6, 50])
            identifier [6, 5] - [6, 17])
            identifier [6, 18] - [6, 50])
          identifier [6, 51] - [6, 53])
        alias [8, 3] - [9, 8])
          string [8, 3] - [8, 27])
          identifier [9, 0] - [9, 8])
        alias [9, 9] - [10, 7])
          string [9, 9] - [9, 32])
          identifier [10, 0] - [10, 7])
        ERROR [10, 8] - [10, 15])
      identifier [10, 22] - [10, 34])
      MISSING ) [10, 34] - [10, 34])
      identifier [10, 36] - [10, 48])
  ERROR [10, 48] - [11, 14])
    ERROR [11, 3] - [11, 14])
  ERROR [13, 0] - [13, 16])
    ERROR [13, 0] - [13, 13])
panekj pushed a commit to panekj/tree-sitter-sql that referenced this issue Jun 21, 2024
* Allow for nested joins

* Add tests for nested joins
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

No branches or pull requests

1 participant