-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert-examples-repo-to-defs cloud nux quickstart_gcp
- Loading branch information
Showing
5 changed files
with
37 additions
and
37 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.dagster] | ||
module_name = "quickstart_gcp" |
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,29 @@ | ||
from .repository import quickstart_gcp | ||
from dagster import ( | ||
ScheduleDefinition, | ||
define_asset_job, | ||
load_assets_from_package_module, | ||
Definitions, | ||
) | ||
|
||
from . import assets | ||
from .io_managers import bigquery_pandas_io_manager | ||
|
||
daily_refresh_schedule = ScheduleDefinition( | ||
job=define_asset_job(name="all_assets_job"), cron_schedule="0 0 * * *" | ||
) | ||
|
||
|
||
defs = Definitions( | ||
assets=load_assets_from_package_module(assets), | ||
resources={ | ||
# Read about using environment variables and secrets in Dagster: | ||
# https://docs.dagster.io/guides/dagster/using-environment-variables-and-secrets | ||
"io_manager": bigquery_pandas_io_manager.configured( | ||
{ | ||
"credentials": {"env": "BIGQUERY_SERVICE_ACCOUNT_CREDENTIALS"}, | ||
"project_id": {"env": "BIGQUERY_PROJECT_ID"}, | ||
} | ||
), | ||
}, | ||
schedules=[daily_refresh_schedule], | ||
) |
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,5 @@ | ||
from quickstart_gcp import defs | ||
|
||
|
||
def test_def_can_load(): | ||
assert defs.get_job_def("all_assets_job") |
This file was deleted.
Oops, something went wrong.