Pablo Beltran
12/22/2022, 3:40 AMDane Linssen
12/22/2022, 12:10 PMdagster_dbt
. We load_assets_from_dbt_project()
and have all our dbt assets in Dagster. We can materialize (dbt) assets and everything works great! However we use K8sRunLauncher
so asset materialization runs in a separate (ephemeral) pod.
Each dbt asset materialization generates a manifest.json
, saved locally on the pod. We want to grab this file and store in on our s3 bucket, however since the pod is ephemeral it’s killed before we can retrieve the file.
What’s the best way to solve this?Airton Neto
12/22/2022, 12:52 PM# %%
from dagster import asset, materialize_to_memory
@asset(
name='simple',
key_prefix='prefix'
)
def simple() -> str:
return "simple"
result = materialize_to_memory(
[simple]
)
simple_res = result.output_for_node(simple.key)
This code throws an error
ParameterCheckError: Param "handle_str" is not a str. Got AssetKey(['prefix', 'simple']) which is type <class 'dagster._core.definitions.events.AssetKey'>.
What is the str key for this asset then? I used not to put a key_prefix and fetch asset results by just calling
result.output_for_node('simple')
Tom
12/22/2022, 3:25 PMorganisations
) has a dependency on an additional upstream asset?
The upstream asset (named organisations_stats
) may also be part of a different multi_asset definition. I see that non_argument_deps
are only supported as a decorator argument (not an AssetOut argument) and is applied to all assets, which results in a lineage showing all 4 assets as downstream of the dependency, which would be incorrect.
The docs on defining and constructing dependencies describe op
definitions, but as I'm new to Dagster and have so far been working at the level of assets, I haven't been able to see how to apply that guidance to asset
definitions.
The real-world sequence I'm trying to represent in Dagster is this:
1. A single API call is made to a data warehouse to refresh 4 materialised views represented by the outs
shown below, every 30 minutes
2. One of those views, organisations
, depends on another materialised view organisation_stats
which is refreshed once daily due to expensive computation but remains valid in that time
3. I would like to use Dagster to manage both of these refresh schedules, and to display the dependency between these two views
4. At the same time, it would be convenient to be able to define the other views (there may be several more) together using a multi_asset, or another approach, because they are all materialised as part of the same operation / API call
What do you recommend? Many thanks for your help! 😀
@multi_asset(
outs={
"opportunities": AssetOut(),
"contacts": AssetOut(),
"projects": AssetOut(),
"organisations": AssetOut(), # <- has an upstream dependency...
},
# non_argument_deps={"organisations_stats"}, # ...which is a dep of organisations only, so this doesn't work
)
def multi_asset_example(context):
# function continued...
@asset
def organisations_stats():
"""This is the additional asset upstream of organisations. It might be defined like this, or as part of a different multi_asset."""
Vinu Praveen
12/22/2022, 5:15 PMDean Morin
12/22/2022, 7:48 PMop
to trigger an ECS task and another to poll for completion? Is this something that already exists or do I need to “roll my own”?Robert Wade
12/22/2022, 9:01 PMAlexey Indeev
12/22/2022, 11:34 PMdbt
model inside of BigQuery using dagster?Tejas
12/23/2022, 9:41 AMmulti_asset
to define the asset outs and My asset defination is [AssetKey(['dbname', 'TABLE1']), AssetKey(['dbname', 'TABLE2']), AssetKey(['dbname', 'TABLE3']), AssetKey(['dbname', 'TABLE4'])]
But I want to select only AssetKey(['dbname', 'TABLE2'])
. When I try to do so, getting an error AssetsDefinition does not support subsetting
geoHeil
12/23/2022, 11:43 AMOleksandr (Alex) Dimov
12/23/2022, 2:49 PMMichel Ebner
12/23/2022, 4:00 PMError: No arguments given and no [tool.dagster] block in pyproject.toml found.
To change from single helm chart to 2 different I just did 3 changes:
• disabled dagster-user-deployment in dagster helm chart (and enableSubChart as well)
• enabled the workspaces in dagster helm chart
• added my workspace (port and service are correct)
I am running on the latest helm chart versions: 1.1.7
Thanks for the help!Michel Ebner
12/23/2022, 4:36 PMContainers with incomplete status: [check-db-ready]
In the logs it just shows:
\tdagster-postgresql:5432 - no response
waiting for database
Even though the service is there...
Again, thanks for any input!Frederik Hagelund
12/23/2022, 5:13 PMBen Wilson
12/23/2022, 10:33 PMOleksandr (Alex) Dimov
12/24/2022, 11:37 AMUri Laserson
12/24/2022, 3:48 PMUri Laserson
12/24/2022, 3:48 PMUri Laserson
12/24/2022, 3:50 PMUri Laserson
12/24/2022, 3:51 PMUri Laserson
12/24/2022, 3:52 PMUri Laserson
12/24/2022, 3:58 PMUri Laserson
12/24/2022, 3:58 PMUri Laserson
12/24/2022, 4:00 PMUri Laserson
12/24/2022, 4:07 PMDaniel Mosesson
12/25/2022, 4:28 PMworking_directory: my_working_directory
in the workspace.yaml does work? my code always seems to load from the location where dagit was started fromYassine AIT BAHA
12/25/2022, 5:45 PMUmar Hussain
12/26/2022, 12:24 PMdagit -f app.py
Daniel Mosesson
12/26/2022, 5:44 PMGustavo Carvalho
12/26/2022, 5:49 PMlatest_materialization_records_by_partition_and_asset
, can only be used when the partitions have matching partition definitions, which is not my case.
Which method should I use instead? I am trying to explore the docs of MultiAssetSensorEvaluationContext
but I am kind of lost 😞