https://dagster.io/ logo
#ask-community
Title
# ask-community
b

Benedikt Buchert

01/02/2023, 4:50 PM
Happy New Year, just starting with dagster. I tried adding fivetran assets. I finished step two here: https://docs.dagster.io/integrations/fivetran#step-2-loading-fivetran-asset-definitions-into-dagster But I'm not seeing any assets in my repo. Should I see them at this step already? Ho can I debug this?
I'm adding my assets in assets/_init_.py together with the dbt assets. And then importing assets in my repo.py. Were I do:
Copy code
defs = with_resources(
    load_assets_from_package_module(assets),
    resources
)
And then:
Copy code
@repository
def deploy_docker_repository():
    return [my_job, my_step_isolated_job, my_schedule, defs]
My dbt assets are showing. But I can't find the the fivetran ones.
In my __init__py under assets I have two variables with assets dbt_assets and fivetran_assets
I don't see any errors but I don't see assets for fivetran in the dagit interface. Should I be sing these at this point?
When i add other new assets in my init.py these seem to be showing
r

Rob Myers

01/02/2023, 6:28 PM
Hi @Benedikt Buchert I was having similar problem - I could get it working by using the individual loader and manually specifying connector names…. (But would be keen to know how to get the load all approach to work!)
👍 1
b

Benedikt Buchert

01/02/2023, 8:20 PM
Hm just tested manually building assets works for me as well.
b

ben

01/04/2023, 9:44 PM
Hi Benedikt & Rob - sorry for the belated response! This is an issue with
load_assets_from_package_module
which we are working on a fix for. If you import the assets directly (e.g.
from .assets import my_fivetran_assets
) you should be able to use them (wrap in with_resources, add to repository etc)
r

Rob Myers

01/05/2023, 8:06 AM
Thanks @ben appreciate the update! Would love to know when fixed When you say import assets directly is this a variant on the one by one approach? (Sorry am very new to dagster so still getting my head round paradigms!)
b

ben

01/05/2023, 3:18 PM
Hi Rob - the fix should be out in the release later today. By importing one-by-one, I mean importing from a Python module one by one. If for example you are loading your assets as
assets.py
Copy code
my_airbyte_assets = load_assets_from_fivetran_instance(...)

@asset
def my_other_asset():
   ...
then you can explicitly import the Airbyte assets from the module, e.g.
__init__.py
Copy code
from . import assets
from .assets import my_airbyte_assets

defs = with_resources(
    [*load_assets_from_package_module(assets), my_airbyte_assets],
    resources
)
After today’s release, though, this shouldn’t be necessary, and you should just be able to do:
assets.py
Copy code
my_airbyte_assets = load_assets_from_fivetran_instance(...)

@asset
def my_other_asset():
   ...
__init__.py
Copy code
from . import assets

defs = with_resources(
    load_assets_from_package_module(assets),
    resources
)
🙌 2
Works like a charm
r

Rob Myers

01/06/2023, 9:17 AM
Yup - perfect…thanks! 🙂
b

Benedikt Buchert

01/06/2023, 12:36 PM
Is there a way that I can include everything from one destination only?
Also if two destination use the same source name it throws an error.
7 Views