Skip to content

Commit

Permalink
alternate namespacing
Browse files Browse the repository at this point in the history
  • Loading branch information
smackesey committed Feb 27, 2025
1 parent 1291ed3 commit 7bbe1e2
Show file tree
Hide file tree
Showing 40 changed files with 214 additions and 162 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dagster_components import SlingReplicationCollectionComponent
from dagster_components.dagster_sling import SlingReplicationCollectionComponent


class CustomSubclass(SlingReplicationCollectionComponent): ...
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections.abc import Mapping
from typing import Any

from dagster_components import SlingReplicationCollectionComponent
from dagster_components.dagster_sling import SlingReplicationCollectionComponent

import dagster as dg

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections.abc import Iterator

from dagster_components import SlingReplicationCollectionComponent
from dagster_components.dagster_sling import SlingReplicationCollectionComponent
from dagster_sling import SlingResource

import dagster as dg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
dg list component-type

Using /.../my-existing-project/.venv/bin/dagster-components
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dagster_components.DefinitionsComponent │ Wraps an arbitrary set │
│ │ of Dagster definitions. │
│ dagster_components.PipesSubprocessScriptCollectionComponent │ Assets that wrap Python │
│ │ scripts executed with │
│ │ Dagster's │
│ │ PipesSubprocessClient. │
└─────────────────────────────────────────────────────────────┴──────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ dagster_components.dagster.DefinitionsComponent │ Wraps an │
│ │ arbitrary set of │
│ │ Dagster │
│ │ definitions. │
│ dagster_components.dagster.PipesSubprocessScriptCollectionComponent │ Assets that wrap │
│ │ Python scripts │
│ │ executed with │
│ │ Dagster's │
│ │ PipesSubprocess… │
└─────────────────────────────────────────────────────────────────────┴──────────────────┘
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: dagster_components.SlingReplicationCollectionComponent
type: dagster_components.dagster_sling.SlingReplicationCollectionComponent

attributes:
replications:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
dg list component-type

Using /.../jaffle-platform/.venv/bin/dagster-components
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dagster_components.DbtProjectComponent │ Expose a DBT project to │
│ │ Dagster as a set of │
│ │ assets. │
│ dagster_components.DefinitionsComponent │ Wraps an arbitrary set │
│ │ of Dagster definitions. │
│ dagster_components.PipesSubprocessScriptCollectionComponent │ Assets that wrap Python │
│ │ scripts executed with │
│ │ Dagster's │
│ │ PipesSubprocessClient. │
│ dagster_components.SlingReplicationCollectionComponent │ Expose one or more Sling │
│ │ replications to Dagster │
│ │ as assets. │
└─────────────────────────────────────────────────────────────┴──────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ dagster_components.dagster.DefinitionsComponent │ Wraps an │
│ │ arbitrary set │
│ │ of Dagster │
│ │ definitions. │
│ dagster_components.dagster.PipesSubprocessScriptCollectionComponent │ Assets that │
│ │ wrap Python │
│ │ scripts │
│ │ executed with │
│ │ Dagster's │
│ │ PipesSubproces… │
│ dagster_components.dagster_dbt.DbtProjectComponent │ Expose a DBT │
│ │ project to │
│ │ Dagster as a │
│ │ set of assets. │
│ dagster_components.dagster_sling.SlingReplicationCollectionComponent │ Expose one or │
│ │ more Sling │
│ │ replications to │
│ │ Dagster as │
│ │ assets. │
└──────────────────────────────────────────────────────────────────────┴─────────────────┘
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dg scaffold component dagster_components.DbtProjectComponent jdbt --project-path dbt/jdbt
dg scaffold component dagster_components.dagster_dbt.DbtProjectComponent jdbt --project-path dbt/jdbt

Creating a Dagster component instance folder at /.../jaffle-platform/jaffle_platform/defs/jdbt.
Using /.../jaffle-platform/.venv/bin/dagster-components
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: dagster_components.DbtProjectComponent
type: dagster_components.dagster_dbt.DbtProjectComponent

attributes:
dbt:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: dagster_components.DbtProjectComponent
type: dagster_components.dagster_dbt.DbtProjectComponent

attributes:
dbt:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
dg list component-type

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dagster_components.DefinitionsComponent │ Wraps an arbitrary set │
│ │ of Dagster definitions. │
│ dagster_components.PipesSubprocessScriptCollectionComponent │ Assets that wrap Python │
│ │ scripts executed with │
│ │ Dagster's │
│ │ PipesSubprocessClient. │
└─────────────────────────────────────────────────────────────┴──────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ dagster_components.dagster.DefinitionsComponent │ Wraps an │
│ │ arbitrary set of │
│ │ Dagster │
│ │ definitions. │
│ dagster_components.dagster.PipesSubprocessScriptCollectionComponent │ Assets that wrap │
│ │ Python scripts │
│ │ executed with │
│ │ Dagster's │
│ │ PipesSubprocess… │
└─────────────────────────────────────────────────────────────────────┴──────────────────┘
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
dg list component-type

Using /.../jaffle-platform/.venv/bin/dagster-components
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ dagster_components.DefinitionsComponent │ Wraps an arbitrary set │
│ │ of Dagster definitions. │
│ dagster_components.PipesSubprocessScriptCollectionComponent │ Assets that wrap Python │
│ │ scripts executed with │
│ │ Dagster's │
│ │ PipesSubprocessClient. │
│ dagster_components.SlingReplicationCollectionComponent │ Expose one or more Sling │
│ │ replications to Dagster │
│ │ as assets. │
└─────────────────────────────────────────────────────────────┴──────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Component Type ┃ Summary ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ dagster_components.dagster.DefinitionsComponent │ Wraps an │
│ │ arbitrary set │
│ │ of Dagster │
│ │ definitions. │
│ dagster_components.dagster.PipesSubprocessScriptCollectionComponent │ Assets that │
│ │ wrap Python │
│ │ scripts │
│ │ executed with │
│ │ Dagster's │
│ │ PipesSubproces… │
│ dagster_components.dagster_sling.SlingReplicationCollectionComponent │ Expose one or │
│ │ more Sling │
│ │ replications to │
│ │ Dagster as │
│ │ assets. │
└──────────────────────────────────────────────────────────────────────┴─────────────────┘
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dg scaffold component 'dagster_components.SlingReplicationCollectionComponent' ingest_files
dg scaffold component 'dagster_components.dagster_sling.SlingReplicationCollectionComponent' ingest_files

Creating a Dagster component instance folder at /.../jaffle-platform/jaffle_platform/defs/ingest_files.
Using /.../jaffle-platform/.venv/bin/dagster-components
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dg scaffold component 'dagster_components.DefinitionsComponent' elt-definitions
dg scaffold component 'dagster_components.dagster.DefinitionsComponent' elt-definitions

Using /.../my-existing-project/.venv/bin/dagster-components
Creating a Dagster component instance folder at /.../my-existing-project/my_existing_project/defs/elt-definitions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: dagster_components.DefinitionsComponent
type: dagster_components.dagster.DefinitionsComponent

attributes:
definitions_path: definitions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dagster_components import ComponentLoadContext, DbtProjectComponent, component
from dagster_components import ComponentLoadContext, component
from dagster_components.dagster_dbt import DbtProjectComponent
from dagster_dbt import DagsterDbtTranslator, DbtCliResource


Expand Down
Loading

0 comments on commit 7bbe1e2

Please sign in to comment.