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

ValueError: 'ibm_db_sa' is not a valid GESqlDialect #5579

Closed
Adenmin opened this issue Jul 24, 2022 · 1 comment
Closed

ValueError: 'ibm_db_sa' is not a valid GESqlDialect #5579

Adenmin opened this issue Jul 24, 2022 · 1 comment
Labels
community devrel This item is being addressed by the Developer Relations Team

Comments

@Adenmin
Copy link

Adenmin commented Jul 24, 2022

Hello there!

So I faced an issue with integration GE and IBM Db2:

Environment (please complete the following information):

  • Operating System: Linux Ubuntu 22.04
  • Great Expectations Version: 0.15.14
  • ibm-db Version: 3.1.2
  • ibm-db-sa Version: 0.3.8
  • SQLAlchemy Version: 1.4.39

Config

datasources:
  db2_test_datasource:
    class_name: Datasource
    data_connectors:
      default_runtime_data_connector_name:
        class_name: RuntimeDataConnector
        module_name: great_expectations.datasource.data_connector
        batch_identifiers:
          - default_identifier_name
      default_inferred_data_connector_name:
        class_name: InferredAssetSqlDataConnector
        include_schema_name: true
        module_name: great_expectations.datasource.data_connector
    module_name: great_expectations.datasource
    execution_engine:
      module_name: great_expectations.execution_engine
      class_name: SqlAlchemyExecutionEngine
      connection_string: ibm_db_sa://admin:[email protected]:50000/TEST

run it

context = ge.data_context.DataContext()

batch_request = RuntimeBatchRequest(
    datasource_name="db2_test_datasource",
    data_connector_name="default_runtime_data_connector_name",
    data_asset_name="default_name",  # this can be anything that identifies this data
    runtime_parameters={"query": "SELECT * FROM TEST_TABLE LIMIT 10"},
    batch_identifiers={"default_identifier_name": "default_identifier"},
)
context.create_expectation_suite(
    expectation_suite_name="test_suite", overwrite_existing=True
)
validator = context.get_validator(
    batch_request=batch_request, expectation_suite_name="test_suite"
)
print(validator.head())

and I got

ValueError: 'ibm_db_sa' is not a valid GESqlDialect

Does GE work correctly with IBM Db2?
I didn't find any documentation around it.

@talagluck talagluck added community devrel This item is being addressed by the Developer Relations Team labels Jul 25, 2022
@talagluck
Copy link
Contributor

Hi @Adenmin - thank you for raising this issue.

IBM Db2 is not a fully tested or supported dialect with Great Expectations. That said, it should be possible to at least start to use Great Expectations with any SQL dialect supported by SqlAlchemy. There had been a bug around dialects such as these, but it was fixed in the latest release, so if you update to 0.15.15, you should be able to get past this error.

I'm going to close this for now since it was resolved in the latest release, but please feel free to open a new issue if you encounter further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community devrel This item is being addressed by the Developer Relations Team
Projects
None yet
Development

No branches or pull requests

2 participants