class Foo:
pass
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
import os | |
from dagster import pipeline, solid, FileHandle, execute_pipeline, DagsterInstance | |
import dagster_pandas | |
import pandas as pd | |
@solid | |
def load_dataframe(_) -> dagster_pandas.DataFrame: | |
# get this instead from previous computation | |
return pd.DataFrame({'nums': [1, 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
templated_command = """ | |
{% for i in range(5) %} | |
echo "{{ ds }}" | |
{% endfor %} | |
""" | |
t3 = BashOperator( | |
task_id='templated', | |
bash_command=templated_command, | |
dag=dag) |
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
from dagster import ScheduleDefinition, schedules | |
from dagster_cron import SystemCronScheduler | |
@schedules(scheduler=SystemCronScheduler) | |
def define_hello_world_schedules(): | |
return [ | |
ScheduleDefinition( | |
name='hello_world_every_min', | |
cron_schedule='* * * * *', | |
pipeline_name='hello_world_pipeline' |
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
repository: | |
file: hello_world.py | |
fn: define_hello_world_rep |
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
from dagster import solid, pipeline, RepositoryDefinition | |
# pipeline from above | |
def define_hello_world_repo(): | |
return RepositoryDefinition( | |
name='hello_world_repo', | |
pipeline_defs=[hello_world_pipeline] | |
) |
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
from dagster import solid, pipeline, RepositoryDefinition | |
@solid | |
def hello_world_solid(context): | |
context.log.info('Hello, World!') | |
@pipeline | |
def hello_world_pipeline(): | |
hello_world_solid() # DSL for building dependency graph | |
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
{ | |
"python.unitTest.pyTestArgs": [ | |
"dagster/dagster_tests/core_tests", | |
"dagit/dagit_tests/test_graphql.py" | |
], | |
"python.analysis.disabled": [ | |
"unresolved-import" | |
], | |
"python.unitTest.pyTestEnabled": true, | |
"python.pythonPath": "/Users/schrockn/code/venvs/dagster-3.7.1/bin/python", |
This file has been truncated, but you can view the full file.
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
. | |
├── .DS_Store | |
├── .coverage | |
├── .pylintrc -> ../.pylintrc | |
├── .pytest_cache | |
│ └── v | |
│ └── cache | |
│ └── nodeids | |
├── .style.yapf -> ../.style.yapf | |
├── .tox |
This file has been truncated, but you can view the full file.
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
. | |
├── .DS_Store | |
├── .coverage | |
├── .pylintrc -> ../.pylintrc | |
├── .pytest_cache | |
│ └── v | |
│ └── cache | |
│ └── nodeids | |
├── .style.yapf -> ../.style.yapf | |
├── .tox |
NewerOlder