Hello, I started working asset factory : given a l...
# ask-community
r
Hello, I started working asset factory : given a list of endpoint or SQL statements, asset names and various asset parameters, we create a list of assets. What would be a proper way to implement this asset factory ? Our current working solution is to first create a dictionnary with asset name as key so that we can retrieve asset endpoint or statement by its asset name using the context (
context.asset_key_for_output()[-1][-1]
). It feels like a workaround and not a good/elegant way to implement this. We also considered adding endpoint/statement as operation tag to retrieve it at runtime/during materialization. Can you give me a suggestion about the best way for such usecase ?
c
mind providing some pseudocode, having trouble parsing what you’re trying to do here