Jinja syntax error: missing endif, in spite of providing it
There is no error in what you have posted here. The error lies elsewhere in your code which you did not include in the OP. Using the Jinja live parser, when pasting in:
{% if spade.corename == 'FI' and spade.nodetype == 'master' %}
dataimport-script:
  file.managed:
    - name: /opt/bin/DataImport.py
    - source: salt://files/DataImport.py

dataimport-crontab:
  file.managed:
    - name: /etc/cron.d/solr-dataimport
    - contents: |
                # # set up data import for FI every 2 minutes
                */2 * * * * root /usr/bin/python /opt/bin/DataImport.py
{% elif spade.nodetype in ['slave','ds'] and spade.corename == 'FI' %}
update-fi-solrconfig:
  file.replace:
    - name: {{ salt['pillar.get']('solr:home_dir') }}/data/{{ 
salt['pillar.get']('spade:Corename') }}/conf/solrconfig.xml
    - pattern: '&quot;autoDeletePeriodSeconds&quot;&gt;30'
    - repl: '&quot;autoDeletePeriodSeconds&quot;&gt;-1'
{% endif %}

With a pillar of:
spade:
  corename: FI
  nodetype: master

Everything renders just fine. This tells me there is nothing wrong with your snippet. The fact that your error indicates you have at least 205 lines of code, but the example has far less tells me the issue was with another &quot;if&quot; block further up in your code.