From 79cf98e6407164462c710df003c949a65d148500 Mon Sep 17 00:00:00 2001 From: Micha BA Kunze Date: Tue, 15 Sep 2020 19:45:55 +0200 Subject: [PATCH] Update the SuiteEditNotebookRenderer.add_header (#1892) Pass environment variables to render_with_overwrite method to allow using environment variables in the jinja templates. This allows use cases where depending on environment variables the notebook code generation can change. We have patched this on our side so we can easily run a profiler on a local/in-memory pandas dataset and then automatically call the `great_expectations suite edit` command and already have the dataset loaded in pandas (which is otherwise not supported since GE does know where the data lives in this case). Co-authored-by: Eugene Mandel --- .../render/renderer/suite_edit_notebook_renderer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/great_expectations/render/renderer/suite_edit_notebook_renderer.py b/great_expectations/render/renderer/suite_edit_notebook_renderer.py index 947eef2f4fc3..f316e6f5d5aa 100755 --- a/great_expectations/render/renderer/suite_edit_notebook_renderer.py +++ b/great_expectations/render/renderer/suite_edit_notebook_renderer.py @@ -165,6 +165,7 @@ def add_header(self, suite_name: str, batch_kwargs) -> None: "header.py.j2", suite_name=suite_name, batch_kwargs=batch_kwargs, + env=os.environ, ) self.add_code_cell(code, lint=True)