Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue42 execute pre post notebook jacques #166

Merged
merged 5 commits into from
Aug 16, 2024

Conversation

JacquesInsight
Copy link
Contributor

Issue #42

The change altered the model_template notebook and added 2 sections and will be visible in the "model.Name" notebook.

image

image

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)

Copy link
Contributor

@grantkriegerai grantkriegerai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good

@grantkriegerai grantkriegerai merged commit d0a9009 into dev Aug 16, 2024
3 checks passed
@grantkriegerai grantkriegerai deleted the issue42ExecutePrePostNotebookJacques branch August 16, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants