Skip to content

Trouble getting Jinja "if" statements to work #148

Description

@dirkdevriendt

something like "valueUrl": "{{gender|lower}}" works
while "valueUrl": "pato:{% if gender == 'F' %}0000383{% else %}0000384{% endif %}" does not

Reference from the docs:
https://github.com/CLARIAH/COW/wiki/12.-example:-if-statement-converting-sex-variable-and-values-appropriately

When using the online cattle.datalegend.net tool, I get the expected result, but using the command line with the exact same json metadata files, the algorithm seems to skip the triples or includes incomplete URIs
I don't think there is a way to increase the logging level and get a better idea of where things go awry?

I can post a complete example if this is not an obvious error/misunderstanding on my end and a test case would help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions