-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Automatically adding a comment to an Athena query provokes an error #2399
Labels
Comments
I encountered the same problem and asked AWS support. |
Looks like setting env var |
Seems to work. Many thanks!! |
Thanks, both of you! Closing this for now. |
daniel-cortez-stevenson
pushed a commit
to daniel-cortez-stevenson/dbt-external-tables
that referenced
this issue
Feb 11, 2022
Assumes use of the https://github.com/Tomme/dbt-athena adapter Considerations: - `query-comment:` in `dbt_project.yml` must be set to nothing - Could be set to some other custom value - Standard block comment in dbt `/*...*/` is not supported in Athena - See getredash/redash#2399 - JSON in `./integration_tests/public_data/json/**/*.json` modified - Otherwise, fails integration test check for equal values - See https://github.com/rcongiu/Hive-JSON-Serde#json-data-files - Piggybacks on the redshift macros for non-hive-compatible partitions - uses redshift helper macros because the query syntax is the same - we use a similar spec setup as Redshift for this reason New env variables need to be set for CI: - ATHENA_TEST_DBNAME - this is an AWS Glue "Data Source" - the schema is set to dbt_external_tables_integration_tests_athena - hardcoded like the other schemas in sample.profiles.yml - this is an AWS Glue "Database" - AWS_REGION - ATHENA_TEST_BUCKET - ATHENA_TEST_WORKGROUP
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Summary
Hey there!
I am using Redash with Athena and it works great so far. Now I wanted to make redash execute the
MSCK REPAIR TABLE mydb.mytable;
command (regularly). Redash executes the query, but automatically adds a a comment like this/* Username: [email protected], Task ID: 7d6dasds21-dsa2c-47das2-a2sd7-400d4s2d270a, Query ID: 10, Queue: queries, Query Hash: dac8d6c15d934f51c2ab */
This command apparently makes the query fail with the message:
FAILED: ParseException line 1:0 cannot recognize input near '/' '*' 'Username'
I don't understand 100% why this happens. Other Athena queries work fine.
When I remove the command in AWS console, it works.
Any idea for quick fix?
Technical details:
The text was updated successfully, but these errors were encountered: