This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Notebook support for python models and globals * Generate Python models SQL in fal directory inside models directory, mimicking structure * Add notebook example and generated SQL
- Loading branch information
Showing
7 changed files
with
138 additions
and
36 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
integration_tests/projects/008_pure_python_models/models/fal/model_e.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
{{ config(materialized='ephemeral') }} | ||
/* | ||
FAL_GENERATED f3d686c040e94a5b33aa082f0ddcd6d3 | ||
Script dependencies: | ||
{{ ref('model_c') }} | ||
*/ | ||
|
||
SELECT * FROM {{ target.schema }}.{{ model.name }} |
13 changes: 13 additions & 0 deletions
13
integration_tests/projects/008_pure_python_models/models/fal/staging/model_c.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
{{ config(materialized='ephemeral') }} | ||
/* | ||
FAL_GENERATED ed955dd5ab415f33c13a1efa0de2fb89 | ||
Script dependencies: | ||
{{ ref("model_b") }} | ||
{{ ref('model_a') }} | ||
*/ | ||
|
||
SELECT * FROM {{ target.schema }}.{{ model.name }} |
35 changes: 35 additions & 0 deletions
35
integration_tests/projects/008_pure_python_models/models/model_e.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from faldbt.magics import init_fal\n", | ||
"%init_fal project_dir=../.. profiles_dir=../../.. default_model_name=model_e_notebook" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"df = ref(\"model_c\")\n", | ||
"\n", | ||
"df[\"my_null\"] = None\n", | ||
"\n", | ||
"write_to_model(df)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"name": "python" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters