https://dagster.io/ logo
Title
c

Chris Nogradi

11/10/2022, 6:01 PM
Hello, I am trying to migrate from my own dynamic airbyte asset creation code to the new airbyte integration functionality and so I tried using
load_assets_from_airbyte_instance()
but it seems it is doing some sort of asset caching and in dagit I don't see any asset being shown anymore. It did when I used
build_airbyte_assets()
Is there some other code that makes the assets actually appear in dagit? I have downstream DBT assets but they now hang off of unlinked SourceAssets in dagit.
d

Dusty Shapiro

11/10/2022, 6:06 PM
This may not pertain to your use case, but I have my load assets defined as:
airbyte_payments_backend_assets = load_assets_from_airbyte_instance(
    airbyte,
    connection_to_group_fn=lambda group_name: "payments_backend_replication",
    key_prefix="payments_backend",
    connection_filter=lambda meta: "Payments" in meta.name,
)
I am then importing the
airbyte_payments_backend_assets
into my repository.py file, which has a method decorated with @repository , which returns an array of definitions which include
airbyte_payments_backend_assets
c

Chris Nogradi

11/10/2022, 6:44 PM
@Dustin Shapiro Thanks, I'll take a look at your code. Maybe the issue is that no asset will get created if no downstreams dependencies exist? And in my case, maybe the DBT source asset keys don't match??
d

Dusty Shapiro

11/10/2022, 6:50 PM
I believe I initially deployed mine without anything downstream. I am deploying via Helm, so maybe my use case is unique to that, but the assets had to be part of the repo definition i was deploying
c

Chris Nogradi

11/10/2022, 8:11 PM
OK I think the problem is that I assumed this was an asset like all others that could be loaded in using the load_assets_from_package_module() used inside of with_resources() which based on the docs does not seem to be the case and instead it generates an asset already loaded and initialize with resources. If this is the case, I think the docs should be clearer and specify an example of how to use it in @repository. However, now that I fixed that, it seems to be dying loading schemas and there is some other issue with the name of the streams. I am trying to debug the problem but I honestly don't know how to debug in dagit and when I try to do it using in process materialization in main.py, I can't figure out how to materialize the airbyte assets since materialize() is not expecting the AirbyteInstanceCacheableAssetsDefinition, any help to debug what is going on would be much appreciated.