https://dagster.io/ logo
#dagster-releases
Title
# dagster-releases
s

schrockn

12/16/2022, 6:54 PM
I just posted a GH discussion to further announce and discuss the switch from
@repository
to
Definitions
. Again to reiterate, there is no need to migrate at the present time. However I do know that many of your are accountable to stakeholders that you need to onboard onto Dagster, and we think this smooths the way. And it will be front-and-center in our documentation and content, so migration will make your code more in line with that.
D 2
s

Stephen Bailey

12/16/2022, 8:54 PM
The only thing I'm not clear on is how the
resources
changes things. If I only ever define one
snowflake
resource for my code location, can I stop defining it in my assets? For example, will this work like I expect?
Copy code
from dagster import asset, Definitions
from my_repo.resource_utils import configured_snowflake_resource, configured_datadog_resource

@asset(required_resource_keys={"snowflake", "datadog"})
def foo():
    return "bar"

def = Definitions(
    assets=[foo],
    resources={"snowflake": configured_snowflake_resource, "datadog": configured_datadog_resource}
)
Currently, I have been adding the following in all my asset definitions:
Copy code
resource_defs={"snowflake": configured_snowflake_resource, "datadog": configured_datadog_resource}
Do I no longer need to do that, and should I simply declare required resource keys?
s

schrockn

12/16/2022, 9:33 PM
Yeah you can just declare the required resource keys.
k

Kulanjith Deelaka

12/29/2022, 7:06 AM
This is great, any plans to update the tutorial videos on YouTube with
Definitions
?
2 Views