Skip to content

[BUG]: load_checks fails when fully qualified table name includes back quote #991

Description

@taylorsweetman

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When the fully qualified path to a table needs to include a backtick due to the inclusion of a character such as -, the table is unable to be loaded for the list of checks.

This happens because the workspace client checks for the existence of the table here. The Databricks SDK for tables.exists enforces NOT using backticks. However, if you omit the backticks such that the workspace client can confirm the existence of the table, then when the table is loaded into a spark df here, the table cannot be loaded because spark DOES enforce the usage of backticks.

Expected Behavior

Backticks can be included in the location argument of calls to the load_checks function when using a TableChecksStorageConfig without throwing any errors.

Steps To Reproduce

  1. Create a table with the fully qualified name of example-catalog.example-schema.example-table (notice the inclusion of the hyphens)
  2. Attempt to load checks from this table:
checks = dq_engine.load_checks(config=TableChecksStorageConfig(location="`example-catalog`.`example-schema`.`example-table`"))
  1. Confirm that DQX throws an exception about the table not existing in the workspace (even though it was created in step 1 above).

Cloud

Azure

Operating System

Windows

Relevant log output

When including the backticks:

NotFound: Checks table `example-catalog`.`example-schema`.`example-table` does not exist in the workspace


When excluding the backticks:

ParseException: [INVALID_IDENTIFIER] ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions