Hello. I present this problem that I have trying t...
# ask-community
Hello. I present this problem that I have trying to implement a dagster flow: I'm loading all my airbyte assets with this line of code:
airbyte_assets = load_assets_from_airbyte_instance(airbyte_instance)
Additionally, I have defined another asset that executes a stored procedure in SQL SERVER:
Copy code
        retry_policy=RetryPolicy(max_retries=5, delay=60),
def sp_sql_server():
    # - Credenciales
    server = 'xxx'
    database = 'xxx'
    username = 'xxx'
    password = 'xxx'
    # - Cadena de conexión
    connection_string = f"DRIVER={{ODBC Driver 18 for SQL Server}};SERVER={server};DATABASE={database};UID={username};PWD={password}"

    with pyodbc.connect(connection_string) as connection:
        connection.execute("EXEC dbo.InsertTimestamp")

    return None
My problem lies in the need to define dependencies between assets, that is, I want my
asset to be executed first and then, through a dependency, a specific asset that is loaded from airbyte is executed, how can I do this? I reviewed the example by benpankow @ben that is on github and there I see a way to define this dependency but in this example it is done the other way around, that is, first the airbyte asset is executed and then the other assets that are defined under the
configuration "
. how to achieve something similar but in reverse way? I thank you in advance for any help.
Hi Alejandro. One option here is using
instead of
, which allows you to pass in an
param that takes a list of asset keys for non argument deps cc @ben
Hi, @claire thanks for your answer. I would ask you to tell me how I can implement this approach to obtain an asset since I try to follow the example in the documentation but I get an error.
Maybe you need to do:
Copy code
Copy code
instead? Looks like you're passing a list inside of a list
❤️ 1