Skip to content

Use ` instead of " to wrap database_and_schema in Slack for "The test query was too long, here's a query to get it." #1986

@mschmidoev

Description

@mschmidoev

Describe the bug
When "The test query was too long, here's a query to get it." runs it posts the database_and_schema with quotation " marks around it. This causes the query not to run in SQL query editors like Datagrip or Databricks as it's incorrect syntax.

Currently it's returning this in Slack
Test query
The test query was too long, here's a query to get it.

SELECT test_results_query FROM "database.schema".elementary_test_results WHERE test_execution_id = '1234.test.xyz.test_model_name'

Expected behavior
Would be better if it returned it wrapped in backticks ` so it could run straight from copying and pasting without any editing needed.
So ideally it would return this:
Test query
The test query was too long, here's a query to get it.

SELECT test_results_query FROM `database.schema`.elementary_test_results WHERE test_execution_id = '1234.test.xyz.test_model_name'

Screenshot
Image

Would you be willing to contribute a fix for this issue?
Yes, will post PR shortly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions