-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dagster-io:master' into deltalake
- Loading branch information
Showing
140 changed files
with
17,452 additions
and
11,240 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
title: Getting Help | Dagster | ||
description: Have questions about how to use Dagster? Hit a bug? Have a feature request? This page includes tips on what to do. | ||
--- | ||
|
||
# Getting Help | ||
|
||
Have questions about how to use Dagster? Hit a bug? Have a feature request? The Dagster Labs team and the Dagster community make a best-effort attempt to respond, on a few different platforms. | ||
|
||
--- | ||
|
||
## Searching for answers | ||
|
||
Search engines like Google generally do a good job at surfacing relevant Dagster docs, Github Discussions and Github Issues, so we recommend starting there. | ||
|
||
Unfortunately, ChatGPT is not currently a great resource for answering questions about Dagster, because the corpus it was trained on doesn’t include Dagster’s latest APIs. | ||
|
||
--- | ||
|
||
## Bugs and feature requests | ||
|
||
We use [Github Issues](https://github.com/dagster-io/dagster/issues) to track all bugs and feature requests from the community, and we welcome issues submitted by users. | ||
|
||
If you find a Github issue that seems like it’s related to the issue you’re experiencing, but you're not sure, don’t be shy about posting on that Github issue to ask. We can redirect it to a different issue if necessary. | ||
|
||
### Tips for filing issues | ||
|
||
- For bugs, include the minimum-sized working code snippet that reproduces your issue. | ||
- If your Github issue includes a code snippet, you can add syntax highlighting by specifying the language at the top of the block: | ||
|
||
```python | ||
from dagster import ... | ||
... | ||
``` | ||
|
||
--- | ||
|
||
## Questions | ||
|
||
If you're trying to find out the best way to use Dagster for your use case, there are a couple places to get help. | ||
|
||
### Github Discussions: the preferred place to ask questions | ||
|
||
[Github Discussions](https://github.com/dagster-io/dagster/discussions) is the main Q & A site for Dagster. For questions whose answers might be useful to others (which is most questions), Github Discussions is the best place to ask them, because they show up when others Google the same questions. | ||
|
||
**Tip:** if your Github discussion includes a code snippet, add syntax highlighting by specifying the language at the top of the block: | ||
|
||
```python | ||
from dagster import ... | ||
|
||
... | ||
``` | ||
|
||
### Dagster Slack: the real-time gathering place for the community | ||
|
||
We strongly encourage you to join [Dagster's Slack](https://dagster.io/slack), as it's the main real-time gathering place for the community. However, if you want a question or issue to be seen by the Dagster team, the best place to post it is in Github. | ||
|
||
Check out the #faq-read-me-before-posting channel for more info. | ||
|
||
### Asking digestible questions | ||
|
||
The less time and effort it takes for someone to digest your question, the more likely it will get answered. The easiest questions to answer include enough information to be clear and specific, but don't require the reader to understand details that aren't relevant. | ||
|
||
Below is an example of a well-phrased question. It's brief enough to be quickly digestible, but specific enough to be complete: | ||
|
||
> Is it possible to set up Dagster to automatically update an entire downstream table every time that a specific partition of an upstream table is updated? We have a table that's partitioned by customer, and we have a specific analysis that we want to do on a specific customer. | ||
Below is another example of a well-phrased question. It's the same as the question above, but also includes background context. As long as the background context doesn't obscure the core question, it's really helpful to include, because it allows the reader to understand the question more deeply and make broader suggestions: | ||
|
||
> Is it possible to set up Dagster to automatically update an entire downstream table every time that a specific partition of an upstream table is updated? We have a table that's partitioned by customer, and we have a specific analysis that we want to do on a specific customer. | ||
> The background here is that that we've set up Fivetran to pulls in our per-customer Salesforce tables into one big Snowflake table. We have about 500 customers, and they get pulled in usually daily, but it depends on the customer. For about 20 of these customers, we have custom logic, implemented in SQL with dbt, that performs analyses that are specific to those customers. We want those analyses to run automatically when customer data is updated, so that our sales representatives can discover red flags when they check their Looker dashboards. | ||
Below is an example of a question that doesn't provide enough detail for the reader to answer it: | ||
|
||
> How do I use tables with specific upstream partitions? | ||
Below is an example a question that's difficult to digest. It requires the reader to understand an entire data pipeline to be able to answer the specific question: | ||
|
||
> We've set up Fivetran to pulls in our per-customer Salesforce tables into one big Snowflake table. We have about 500 customers, and they get pulled in usually daily, but it depends on the customer. For about 20 of these customers, we have custom logic, implemented in SQL with dbt, that performs analyses that are specific to those customers. We want those analyses to run automatically when customer data is updated, so that our sales representatives can discover red flags when they check their Looker dashboards. How can I get this working with Dagster? |
46 changes: 46 additions & 0 deletions
46
examples/docs_snippets/docs_snippets/concepts/assets/asset_checks/factory.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from typing import Any, Mapping, Sequence | ||
|
||
from dagster import AssetCheckResult, Definitions, asset, asset_check | ||
|
||
|
||
@asset | ||
def orders(): | ||
... | ||
|
||
|
||
@asset | ||
def items(): | ||
... | ||
|
||
|
||
def make_checks(check_blobs: Sequence[Mapping[str, str]]): | ||
checks = [] | ||
for check_blob in check_blobs: | ||
|
||
@asset_check(name=check_blob["name"], asset=check_blob["asset"]) | ||
def _check(context): | ||
db_connection = ... | ||
rows = db_connection.execute(check_blob["sql"]) | ||
return AssetCheckResult( | ||
passed=len(rows) == 0, metadata={"num_rows": len(rows)} | ||
) | ||
|
||
checks.append(_check) | ||
|
||
return checks | ||
|
||
|
||
check_blobs = [ | ||
{ | ||
"name": "orders_id_has_no_nulls", | ||
"asset": "orders", | ||
"sql": "select * from orders where order_id is null", | ||
}, | ||
{ | ||
"name": "items_id_has_no_nulls", | ||
"asset": "items", | ||
"sql": "select * from items where item_id is null", | ||
}, | ||
] | ||
|
||
defs = Definitions(assets=[orders, items], asset_checks=make_checks(check_blobs)) |
19 changes: 18 additions & 1 deletion
19
examples/docs_snippets/docs_snippets_tests/concepts_tests/assets_tests/test_asset_checks.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
import pytest | ||
|
||
from dagster._core.definitions.asset_check_spec import AssetCheckKey | ||
from dagster._core.definitions.events import AssetKey | ||
from docs_snippets.concepts.assets.asset_checks.asset_with_check import ( | ||
defs as asset_with_check_defs, | ||
) | ||
from docs_snippets.concepts.assets.asset_checks.factory import check_blobs, make_checks | ||
from docs_snippets.concepts.assets.asset_checks.metadata import defs as metadata_defs | ||
from docs_snippets.concepts.assets.asset_checks.orders_check import defs as orders_defs | ||
from docs_snippets.concepts.assets.asset_checks.severity import defs as severity_defs | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"defs", [orders_defs, asset_with_check_defs, severity_defs, metadata_defs] | ||
"defs", | ||
[orders_defs, asset_with_check_defs, severity_defs, metadata_defs], | ||
) | ||
def test_execute(defs): | ||
job_def = defs.get_implicit_global_asset_job_def() | ||
result = job_def.execute_in_process() | ||
assert result.success | ||
|
||
|
||
def test_factory(): | ||
assert [c.spec.key for c in make_checks(check_blobs)] == [ | ||
AssetCheckKey( | ||
AssetKey(["orders"]), | ||
"orders_id_has_no_nulls", | ||
), | ||
AssetCheckKey( | ||
AssetKey(["items"]), | ||
"items_id_has_no_nulls", | ||
), | ||
] |
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
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
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
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
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
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
Oops, something went wrong.