Skip to content

Commit

Permalink
Update the SuiteEditNotebookRenderer.add_header (#1892)
Browse files Browse the repository at this point in the history
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 <eugene.mandel@gmail.com>
  • Loading branch information
mbakunze and eugmandel authored Sep 15, 2020
1 parent bb10084 commit 79cf98e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 79cf98e

Please sign in to comment.