Issue42 execute pre post notebook jacques #166
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #42
The change altered the model_template notebook and added 2 sections and will be visible in the "model.Name" notebook.
The logic will execute a notebook with the ".preexecute" suffix before the SQL code and a notebook with the ".postexecute" suffix after the SQL code executed. These notebooks are not created by the framework and allows customers the flexability for custom notebooks to execute before and after the framework generated code.
Notebook name created by the framework "model.issue42.my_first_dbt_model"
Notebook name to executed before: "model.issue42.my_first_dbt_model.preexecute"
Notebook name to executed before: "model.issue42.my_first_dbt_model.postexecute"
If the notebook does not exist a message will be shown as seen in image 1
A sample of a notebook postexecute can be seen in image 2
To confirm if the logic works create a notebook with the preexecute and postexecute suffix and add this code to it:
df = 'Testing Issue42 Custom Notebook Execution'
display(df)