great_expectations icon indicating copy to clipboard operation
great_expectations copied to clipboard

Add a Data Docs site to DataContext() with code

Open luizfgoncalves opened this issue 2 years ago • 1 comments

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

luizfgoncalves avatar Nov 04 '21 20:11 luizfgoncalves

Thanks so much for opening this issue, @luizfgoncalves! This is an awesome idea. We will review and be in touch.

talagluck avatar Nov 05 '21 21:11 talagluck

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).

anthonyburdi avatar Jun 29 '23 19:06 anthonyburdi