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

Update Documentation for GX Core ( Run Validations Section ) #10823

Open
RupeshKeesaram opened this issue Jan 6, 2025 · 0 comments
Open

Update Documentation for GX Core ( Run Validations Section ) #10823

RupeshKeesaram opened this issue Jan 6, 2025 · 0 comments

Comments

@RupeshKeesaram
Copy link

Describe the bug
When following the documentation to know more about the Validation definition & running validations, I'm encountering the following issue

BuildBatchRequestError: Bad input to build_batch_request: options must contain exactly 1 key, 'dataframe'.

Even though answer to this issue is provided at #10270 , it's not updated in the documentation

To Reproduce
import great_expectations as gx

context = gx.get_context()
set_up_context_for_example(context)

Retrieve an Expectation Suite

expectation_suite_name = "my_expectation_suite"
expectation_suite = context.suites.get(name=expectation_suite_name)

Retrieve a Batch Definition

data_source_name = "my_data_source"
data_asset_name = "my_data_asset"
batch_definition_name = "my_batch_definition"
batch_definition = (
context.data_sources.get(data_source_name)
.get_asset(data_asset_name)
.get_batch_definition(batch_definition_name)
)

Create a Validation Definition

definition_name = "my_validation_definition"
validation_definition = gx.ValidationDefinition(
data=batch_definition, suite=expectation_suite, name=definition_name
)

Add the Validation Definition to the Data Context

validation_definition = context.validation_definitions.add(validation_definition)

validation_results = validation_definition.run()

Expected behavior
The batch data should be validated with the provided expectation suite, but it's throwing an BuildBatchRequestError.

Environment (please complete the following information):

  • Operating System: [Windows]
  • Great Expectations Version: [1.2.6]
  • Data Source: [Pandas]
  • Cloud environment: [Local]

Additional context
The issue can be mitigated or fixed by passing batch_parameters. Update the documentation for the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant