Skip to content

Commit

Permalink
[docs] dragster essentials - lesson 6 - code example indentation fix (#…
Browse files Browse the repository at this point in the history
…18058)

## Summary & Motivation

- Removes the usage of tabs in code samples that cause visually
misaligned indentation; this is something minor, but figured I'd throw
in a PR while it's at the forefront of my mind.

<img width="477" alt="image"
src="https://github.com/dagster-io/dagster/assets/5807118/9ab6c1e1-3a58-4647-a913-96adbc87cb29">

## How I Tested These Changes

- Previewed rendered markdown and confirmed alignment is ideal
  • Loading branch information
cmpadden authored Nov 16, 2023
1 parent 1f15855 commit 56f28d5
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Throughout this module, you’ve used DuckDB to store and transform your data. E
deps=["taxi_trips_file"],
)
def taxi_trips():
...
conn = duckdb.connect(os.getenv("DUCKDB_DATABASE"))
...
...
conn = duckdb.connect(os.getenv("DUCKDB_DATABASE"))
...
```

Every asset that queries DuckDB contains the `duckdb.connect` line. As previously mentioned, this can become brittle and error-prone as your project grows, whether in the number of assets that use it or the complexity of the connections. For example, to MotherDuck, a specific S3 bucket, or loading an extension. To be exact, this brittleness is shared across the following assets:
Expand Down Expand Up @@ -93,10 +93,10 @@ Update `dagster_university/__init__.py` with the following changes:

```python
defs = Definitions(
assets=[*trip_assets, *metric_assets],
resources={
"database": database_resource,
},
assets=[*trip_assets, *metric_assets],
resources={
"database": database_resource,
},
)
```

Expand Down

1 comment on commit 56f28d5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-kuhy6jiri-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 56f28d5.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.