I’m running my DAG with configuration JSON, which includes parameters which includes -
, e.g. market-name
When I’m trying to read it using the following Jinja template:
path_prefix = f"market={{{{ params.market-name }}}}/configuration"
I’m getting the following error:
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'market'
It seems to me that Jinja doesn’t identify the full param name market-name but get the first part before the -
which is market .
My questions:
- Does Jinja supports having
-
in the middle of a param (e.g.market-name
) or should I avoid it from the beginning and usemarket_name
instead? - If Jinja doesn’t support having a
-
in the middle of a param
- Should I escape the
market-name
? - How should I escape it?
- Should I use
{{ params.market-name }}
instead of{{{{ params.market-name }}}}
?