Skip to content

Commit

Permalink
The assets package is now autoloaded (#1754)
Browse files Browse the repository at this point in the history
* The assets package is now autoloaded

* More clean up
  • Loading branch information
ravenac95 authored Jul 3, 2024
1 parent 74ce965 commit 8a40a54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
10 changes: 0 additions & 10 deletions apps/docs/docs/contribute/connect-data/bigquery/replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ For the latest documentation on configuration parameters,
check out the comments in the
[BigQuery Data Transfer factory](https://github.com/opensource-observer/oso/blob/main/warehouse/oso_dagster/factories/bq_dts.py).

In order for our Dagster deployment to recognize this asset,
you need to import it in
`warehouse/oso_dagster/assets/__init__.py`.

```python
...
from .lens import *
...
```

For more details on defining Dagster assets,
see the [Dagster tutorial](https://docs.dagster.io/tutorial).

Expand Down
8 changes: 3 additions & 5 deletions apps/docs/docs/contribute/connect-data/dagster.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ At a high-level, there are 2 possible pathways:
it can lead to performance issues, especially if the data does not
easily fit in memory.

Assets should be added to
`warehouse/oso_dagster/assets/` and then imported in
`warehouse/oso_dagster/assets/__init__.py`.
All assets defined in this module are automatically
loaded into Dagster from the main branch of the git repository.
Assets should be added to `warehouse/oso_dagster/assets/`. All assets defined in
this package are automatically loaded into Dagster from the main branch of the
git repository.

For an example of a custom Dagster asset, check out the
[asset for oss-directory](https://github.com/opensource-observer/oso/blob/main/warehouse/oso_dagster/assets/ossd.py),
Expand Down
11 changes: 2 additions & 9 deletions apps/docs/docs/contribute/connect-data/gcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,8 @@ For the latest documentation on configuration parameters,
check out the comments in the
[GCS factory](https://github.com/opensource-observer/oso/blob/main/warehouse/oso_dagster/factories/gcs.py).

In order for our Dagster deployment to recognize this asset,
you need to import it in
`warehouse/oso_dagster/assets/__init__.py`.

```python
from .dbt import *
from .gitcoin import *
...
```
In order for our Dagster deployment to recognize this asset, you must ensure
that it is a python file in the directory `warehouse/oso_dagster/assets/`.

For more details on defining Dagster assets,
see the [Dagster tutorial](https://docs.dagster.io/tutorial).
Expand Down

0 comments on commit 8a40a54

Please sign in to comment.