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

DataContext, BaseDataContext, DataContextConfig, and get_checkpoint() #1795

Closed
williamBartos opened this issue Aug 13, 2020 · 1 comment
Closed

Comments

@williamBartos
Copy link

williamBartos commented Aug 13, 2020

The documentation outlines a way to dynamically generate a data context. I'm planning on running this from the script created from the checkpoint script cli call.

However there's a few issues:

  1. DataContextConfig can only be used to instantiate BaseDataContext and not DataContext. The DataContextConfig is passed in via the project_config arg.
  2. BaseDataContext doesnt have a get_checkpoint() method. So I can't use it in place of DataContext.

__init__ of BaseDataContext: https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/data_context/data_context.py#L224
__init__ of DataContext: https://github.com/great-expectations/great_expectations/blob/develop/great_expectations/data_context/data_context.py#L2245

If I'm understanding correctly, this means that I'm unable to create a DataContextConfig dynamically and use it in a Checkpoint. This is because DataContext seems to only accept a yaml file as a config and not a DataContextConfig.

Describe the solution you'd like

DataContext should be able to be instantiated with a DataContextConfig, either through a project_config arg like BaseDataContext or through some other method.

@eugmandel
Copy link
Contributor

Replied on this in https://discuss.greatexpectations.io/t/datacontext-basedatacontext-datacontextconfig-and-get-checkpoint/315/2 - since the workaround exists, closing the issue.

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

2 participants