https://kedro.org/ logo
#questions
Title
# questions
g

Gabriel Bandeira

10/04/2023, 6:02 PM
Is Jinja2 sintax working on kedro
0.18.12
? I tried writting my catalog as:
Copy code
{% for group in ["A", "B", "C"] %}

my_dataset_{{group}}:
  type: pandas.ParquetDataSet
  filepath: data/03_processed/my_dataset/group={{group}}/my_dataset.parquet

{% endfor %}
but I got the error
ParserError: Invalid YAML or JSON file <my_path>/conf/base/catalog.yml, unable to read line 0, position 1.
d
g

Gabriel Bandeira

10/04/2023, 7:57 PM
no, I’m using
OmegaConfigLoader
d

Deepyaman Datta

10/04/2023, 11:15 PM
Jinja only works with
TemplatedConfigLoader
. I'm 99% sure you can use dataset factories for this; see https://docs.kedro.org/en/stable/data/kedro_dataset_factories.html#how-to-generalise-datasets-of-the-same-type.
👍 1
thankyou 1