https://dagster.io/ logo
Title
j

Jeremy

09/28/2022, 5:30 PM
going through the update process.
gateway_pings_group_prod = AssetGroup(
    [gateway_pings, get_unique_ip_addresses],
    resource_defs=RESOURCES_PRODUCTION
)
gateway_pings_prod = gateway_pings_group_prod.build_job(
    name="splunk_gateway_pings",
    tags={"notify": "slack"}
)
gateway_pings_schedule = build_schedule_from_partitioned_job(
    gateway_pings_prod
)
how do i do this now? I see that AssetGroup is deprecated and I should use
load_assets_from_package_module
but I don;t see how to set
resource_defs
and how should I rewrite the build_job part? also, i don’t have my assets split into modules. do I need to do that?
[gateway_pings, get_unique_ip_addresses]
are just 2 assets in a file with several others.
c

claire

09/28/2022, 7:32 PM
Hi Jeremy. To answer your question in parts, you can set resource defs on assets using the
with_resources
function: https://docs.dagster.io/concepts/resources#providing-resources-to-software-defined-assets In order to build a job from a group of assets, you could use the
AssetSelection
API: https://docs.dagster.io/_apidocs/assets#dagster.AssetSelection and build a job by doing something like:
define_asset_job("my_job", AssetSelection.groups("group_name"))
👍 1