Skip to content

Commit

Permalink
[docs] add note of defer_table_reflect to dlt docs (#26628)
Browse files Browse the repository at this point in the history
## Summary & Motivation

- A community member pointed out that by setting this you can reduce the
reads on your database when the Dagster daemon polls to refresh
definitions

<img width="1218" alt="image"
src="https://github.com/user-attachments/assets/c230b6cb-1586-4436-99c1-7dfd30cb36be"
/>

Closes #26627

## How I Tested These Changes

## Changelog

NOCHANGELOG
  • Loading branch information
cmpadden authored Dec 20, 2024
1 parent baefba6 commit 4cc5726
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/content/integrations/embedded-elt/dlt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ The <PyObject object="dlt_assets" module="dagster_embedded_elt.dlt" decorator />
In the same file containing your Dagster assets, you can create an instance of your <PyObject object="dlt_assets" module="dagster_embedded_elt.dlt" decorator /> by doing something like the following:
<Note>
If you are using the{" "}
<a href="https://dlthub.com/docs/api_reference/sources/sql_database/__init__#sql_database">
sql_database
</a>{" "}
source, consider setting <code>defer_table_reflect=True</code> to reduce
database reads. By default, the Dagster daemon will refresh definitions
roughly every minute, which will query the database for resource definitions.
</Note>
```python
from dagster import AssetExecutionContext, Definitions
from dagster_embedded_elt.dlt import DagsterDltResource, dlt_assets
Expand Down

1 comment on commit 4cc5726

@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-fpzea8ws6-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 4cc5726.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.