When referencing an upstream asset - how can I ens...
# ask-community
g
When referencing an upstream asset - how can I ensure the uniqueness of the name/reference? And potentially reference the asset explicitly i.e. by giving the full asset key / and having a nice alias in the function argument?
r
are you referencing them in another asset definition? I think asset keys are unique by design? I almost exclusively use the
ins
argument of the decorator to define dependencies, it allows you to explicitly map input arguments to asset keys so that your dependencies are explicit.
g
they keys are unique
but not neccessarily the argument name to an asset function
in particular not a readable one
think about an enterprise settings where schema foo and table bar might reside in two separate warehouses (on-prem and cloud) perhaps and have different contents (if not even schemata)
Probably I should go via the ins as well. But it is a bit of typograpic overhead. However, so far I would not see any other way
Do you see anything else?
r
the argument names to the asset functions are short-hands for keys, so if you don't want to use
ins
I think you'd be forced to make them unique. You might be able to do something using
@repository
with prefixes to define independent code locations, but that doesn't seem to be recommended.
g
hm might be workable - let me explore the
ins
more