-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41e94f4
commit c84ccd2
Showing
10 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -136,4 +136,8 @@ logs/ | |
data/** | ||
!data/datasets/.gitkeep | ||
|
||
# Quarto | ||
/.quarto/ | ||
|
||
# Environment | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
from dagster import Definitions, load_assets_from_modules | ||
from dagster_dbt import DbtCliResource, load_assets_from_dbt_project | ||
from dagster_duckdb_pandas import DuckDBPandasIOManager | ||
|
||
from . import assets, jobs | ||
|
||
DBT_PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) + "/../dbt/" | ||
DATA_DIR = os.path.dirname(os.path.abspath(__file__)) + "/../data/" | ||
|
||
dbt = DbtCliResource(project_dir=DBT_PROJECT_DIR, profiles_dir=DBT_PROJECT_DIR) | ||
|
||
dbt_assets = load_assets_from_dbt_project(DBT_PROJECT_DIR, DBT_PROJECT_DIR) | ||
python_assets = load_assets_from_modules([assets]) | ||
|
||
resources = { | ||
"dbt": dbt, | ||
"io_manager": DuckDBPandasIOManager(database=DATA_DIR + "local.duckdb"), | ||
} | ||
|
||
defs = Definitions( | ||
assets=[*dbt_assets, *python_assets], | ||
resources=resources, | ||
jobs=[jobs.all_assets_job], | ||
) |
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 was deleted.
Oops, something went wrong.
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,10 @@ | ||
from dagster import AssetSelection, define_asset_job, load_assets_from_modules | ||
|
||
from . import assets | ||
|
||
assets = load_assets_from_modules(modules=[assets]) | ||
|
||
all_assets_job = define_asset_job( | ||
name="all_assets_job", | ||
selection=AssetSelection.all(), | ||
) |
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,8 @@ | ||
from dagster import ConfigurableResource | ||
|
||
|
||
class HuggingFaceResource(ConfigurableResource): | ||
# token: str = EnvVar("HUGGINGFACE_TOKEN") | ||
|
||
def login(self): | ||
raise NotImplementedError() |
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 |
---|---|---|
@@ -1 +1 @@ | ||
select country, iso_code, year, co2 from {{ source("public", "raw_owid_co2_data") }} | ||
select country, iso_code, year, co2 from {{ source("public", "owid_co2_data") }} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
select * from {{ source("public", "raw_threatened_animal_species") }} | ||
select * from {{ source("public", "threatened_animal_species") }} |
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