How can I do a query on a csv file using the header file with apache drill
<p>I have a problem querying a csv file with header like this:</p>

<pre><code>ID, NOMBRE, APELLIDOS, PROVINCIA
12121212, MARIA, LIONZA, MADRID
12312312, JAIMITO, PEREZ, ALMERÍA
13131313, BRUNO, DIAZ, MALAGA
23423423, HARLEY, QUINN, BARCELONA
</code></pre>

<p>I am doing it over apache drill UI v1.8. 
When a do the following query 
<br/>
SELECT * FROM dfs.'<em>path_to_file</em>/clientes.csv' it works perfectly and it returns a table like this:
<a href="https://i.stack.imgur.com/yuPFG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yuPFG.png" alt="enter image description here"></a> </p>

<p>But if I do a query specifying the columns names (the headers of the csv file) then some columns are empty for any reason I haven´t figured out yet and is driving me crazy
p.e. this query
<br/>
SELECT ID, NOMBRE FROM dfs.'<em>path_to_file</em>/clientes.csv'</p>

<p>Return this</p>

<p><a href="https://i.stack.imgur.com/rHetG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rHetG.png" alt="enter image description here"></a></p>

<p>Also I edited the dfs plugin and added the property extractHeader to true</p>

<pre><code>...
"csv": {
      "type": "text",
      "extensions": [
        "csv"
      ],
      "extractHeader": true,
      "delimiter": ","
    },
...
</code></pre>

<p>So what I'm doing wrong? why I can query by ID but not by the other fields (header names) like NOMBRE or PROVINCIA. Do you have any idea? </p>