great_expectations.render.renderer.datasource_new_notebook_renderer

Module Contents

Classes

DatasourceNewNotebookRenderer(context: DataContext, datasource_type: DatasourceTypes, datasource_yaml: str, datasource_name: Optional[str] = ‘my_datasource’, sql_credentials_snippet: Optional[str] = None)

Abstract base class for methods that help with rendering a jupyter notebook.

class great_expectations.render.renderer.datasource_new_notebook_renderer.DatasourceNewNotebookRenderer(context: DataContext, datasource_type: DatasourceTypes, datasource_yaml: str, datasource_name: Optional[str] = 'my_datasource', sql_credentials_snippet: Optional[str] = None)

Bases: great_expectations.render.renderer.notebook_renderer.BaseNotebookRenderer

Abstract base class for methods that help with rendering a jupyter notebook.

SQL_DOCS = ### For SQL based Datasources:

Here we are creating an example configuration based on the database backend you specified in the CLI. The configuration contains an InferredAssetSqlDataConnector, which will add a Data Asset for each table in the database, and a RuntimeDataConnector which can accept SQL queries. This is just an example, and you may customize this as you wish!

Also, if you would like to learn more about the DataConnectors used in this configuration, please see our docs on [InferredAssetDataConnectors](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/configuring_datasources/how_to_configure_an_inferredassetdataconnector.html) and [RuntimeDataConnectors](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/creating_batches/how_to_configure_a_runtime_data_connector.html).

Credentials will not be saved until you run the last cell. The credentials will be saved in uncommitted/config_variables.yml which should not be added to source control.

FILES_DOCS = ### For files based Datasources:

Here we are creating an example configuration. The configuration contains an InferredAssetFilesystemDataConnector which will add a Data Asset for each file in the base directory you provided. It also contains a RuntimeDataConnector which can accept filepaths. This is just an example, and you may customize this as you wish!

Also, if you would like to learn more about the DataConnectors used in this configuration, including other methods to organize assets, handle multi-file assets, name assets based on parts of a filename, please see our docs on [InferredAssetDataConnectors](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/configuring_datasources/how_to_configure_an_inferredassetdataconnector.html) and [RuntimeDataConnectors](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/creating_batches/how_to_configure_a_runtime_data_connector.html).

DOCS_INTRO
_add_header(self)
_add_docs_cell(self)
_add_sql_credentials_cell(self)
_add_template_cell(self)
_add_test_yaml_cells(self)
_add_save_datasource_cell(self)
render(self)

Render a notebook from parameters.

render_to_disk(self, notebook_file_path: str)

Render a notebook to disk from arguments