-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
data_asset_name can't be specified with fluent datasources for use in data docs #8790
Comments
Hi @morphatic! Thanks for raising this. We've captured this for review. |
Is there an update on this? |
Hi, is there any update? Pls... |
Just wanted to add to this, I was following a similar discussion to @morphatic in the GX forums in this thread. I settled on the same temporary fix after a bit of investigating, but it would be really nice to see if there is any update on an actual fix. Thanks! |
Thanks for the quick fix. I was having the same issue. Hopefully it gets officially solved soon. |
I'll be looking into this shortly. |
Fixed in version https://github.com/great-expectations/great_expectations/releases/tag/0.18.14 |
Describe the bug
When running a checkpoint and producing data docs from a batch request generated with the
build_batch_request()
method of a Fluent pandas filesystem datasource, the "Asset Name" column of the resulting data docs is never populated.To Reproduce
This repository contains a minimum reproduction.
great_expectations.yml
Expected behavior
The "Asset Name" column should be filled in the produced data docs.
Possible Causes and Fixes
There are two ways to approach this issue. It could be either or both of a problem in:
BatchRequest
class implemented for Fluent datasourcesWhen I asked about this issue in the GX Slack channel it was suggested that I could specify a value for the
batch_spec_passthrough
parameter. I tried doing this in several ways:Inconsistent API for
BatchRequest
classessesThis led me to realize that the API for the
BatchRequest
class is NOT consistent across implementations:great_expectations.core.batch.BatchRequest
is the "core" definition which defines and allows you to edit thebatch_spec_passthrough
propertygreat_expectations.datasource.fluent.batch_request.BatchRequest
is the "Fluent" version which has the same class name and has the same general function, but does NOT inherit the same properties as the coreBatchRequest
class. Instead it inherits frompydantic.BaseModel
It's not immediately clear to people who are relatively new to GX (like me) that these two
BatchReuquest
classes don't provide equivalent functionality.A "quick" fix in the Renderer
The
data_asset_name
IS available in the metadata that gets passed to the renderer that creates the data docs. The current renderer code does not access it however. I WAS able to get the "Asset Name" column in the data docs to populate correctly with the following change to that code:This "fixes" the immediate problem, but it feels kind of like a bandaid and that better solution would be to have a unified API for any class called
BatchRequest
.Environment (please complete the following information):
Additional context
There's a thread about this issue in the GX Slack channel.
The text was updated successfully, but these errors were encountered: