great_expectations
great_expectations copied to clipboard
Add a Data Docs site to DataContext() with code
Is your feature request related to a problem? Please describe.
I want to add a new data_docs_site
for my DataContext
object using code. (e.g: A Doc for Azure).
Currently, we can add data_sources, expectation_suites, stores, but there is no option for data docs.
Describe the solution you'd like
I would like a new method add_data_docs_site()
to DataContext
. This would insert the data_docs_site properties to the context and also update the project yaml file.
The parameters could be name and config (as a dict).
Something like:
def add_data_docs_site(self, name, config):
self._project_config['data_docs_sites'][name] = config
self.validate_data_docs_config() #Check env. variables to see if there is any problem
self.update_yaml() #Update GE .yaml file with new configuration
Describe alternatives you've considered
I've tried to use the BaseDataContext
combined with DataContextConfig
. It works, but it doesn't have the same functionalities as using just DataContext
.
Also, I've looked upon the method add_store(), but it didn't help as stores are not exactly data_docs. It seems there is no method for this task yet
Thanks so much for opening this issue, @luizfgoncalves! This is an awesome idea. We will review and be in touch.
Hi @luizfgoncalves! We have implemented this functionality in https://github.com/great-expectations/great_expectations/pull/8194 which will be released in our next scheduled release (planned for today).