PaulPeterson1
2 years agoQrew Assistant Captain
Looking for Jinja Sanity Check
I'm working with a pipeline that will retrieve a JSON object using a webhook. I would prefer to do some logic in the pipeline rather than creating several new fields in the table. In a few instances the JSON will have values in one of two related fields. If they are able to scan a barcode there will be a value in the scan field, if not there will be a value in a related text field.
Here's the question, will the Jinja below yield the output discussed above:
{% if a.scan_value <> "" %}{{a.scan_value}}{% else%}{{a.text_value}}{% endif %}
------------------------------
Paul Peterson
------------------------------