-
Notifications
You must be signed in to change notification settings - Fork 128
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
update quotes #227
Merged
Merged
update quotes #227
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey @mhmtsrmn - I think simply swapping the outer quotes to double quotes may not do us here because double quote strings doesn't work for all adapters/datawarehouses - Snowflake example: I'm wondering if it's better to actually regex replace all single quotes in the var: |
NiallRees
reviewed
Oct 28, 2022
This is now working with a |
robertholmes3
pushed a commit
to robertholmes3/dbt_artifacts
that referenced
this pull request
Nov 2, 2022
* update quotes * Update macros/upload_invocations.sql * Update upload_invocations.sql * Fix bigquery quotes * Remove snapshot from spark tests due to file type Co-authored-by: Niall Woodward <niall@niallrees.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my production job I have had the following error:
2022-10-16 07:13:24.351003 (MainThread): �[0m07:13:24 Spark adapter: ('42000', '[42000] [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: org.apache.hive.service.cli.HiveSQLException: Error running query: org.apache.spark.sql.catalyst.parser.ParseException: \nextraneous input \'\' in the dbt_cloud_prod DAG.\'\' expecting {\')\', \',\'}(line 42, pos 58)\n\n== SQL ==\n/* {"app": "dbt", "dbt_version": "1. (80) (SQLExecDirectW)')
When I checked the logs I realized that the compiled SQL for
dbt_artifacts.invocations
was as following:2022-10-16 07:13:24.350715 (MainThread): �[0m07:13:24 Spark adapter: Error while running:
/* {"app": "dbt", "dbt_version": "1.2.2", "profile_name": "user", "target_name": "prod", "connection_name": "master"} */
` insert into prod_analytics_artifacts.invocations
`
That is, when the
DBT_CLOUD_RUN_REASON
was referenced the airflow job idtrigger_dbt
in single quotes, the original single quotes that makes a call toenv_var
was conflicting. As a result, I changed the single quotes to double quotes.