You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jgranduel (via GitHub)" <gi...@apache.org> on 2024/08/06 14:26:36 UTC

[I] CSV headers not recognized [datafusion]

jgranduel opened a new issue, #11848:
URL: https://github.com/apache/datafusion/issues/11848

   ### Describe the bug
   
   Giving a new try to `datafusion-cli`, I followed the first examples in documentation [Local Files/Directories](https://datafusion.apache.org/user-guide/cli/datasources.html):
   ```
   $ echo "a,b" > data.csv
   $ echo "1,2" >> data.csv
   ```
   then
   ```
   > datafusion-cli.exe
   DataFusion CLI v40.0.0
   > select * from './data.csv';
   +----------+----------+
   | column_1 | column_2 |
   +----------+----------+
   | a        | b        |
   | 1        | 2        |
   +----------+----------+
   2 row(s) fetched.
   ```
   
   I thought the mistake was due to Windows default settings (I set EOL as '\n' without success), then installed `datafusion-cli 40.0.0` on WSL with same results. Loading from a directory gave the same results:
   
   ```
   > datafusion-cli.exe
   DataFusion CLI v40.0.0
   > select * from './data_dir/';
   +----------+----------+
   | column_1 | column_2 |
   +----------+----------+
   | a        | b        |
   | 1        | 2        |
   | a        | b        |
   | 3        | 4        |
   +----------+----------+
   4 row(s) fetched.
   ```
   
   
   
   ### To Reproduce
   
   see above
   
   ### Expected behavior
   
   a and b should be headers.
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CSV headers not recognized [datafusion]

Posted by "korowa (via GitHub)" <gi...@apache.org>.
korowa closed issue #11848: CSV headers not recognized
URL: https://github.com/apache/datafusion/issues/11848


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] CSV headers not recognized [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #11848:
URL: https://github.com/apache/datafusion/issues/11848#issuecomment-2282738430

   Thank you @jgranduel 
   
   @korowa  has a doc update here https://github.com/apache/datafusion/pull/11919 and I made a proposal to just fix the default config value here https://github.com/apache/datafusion/issues/11936 so the example works as expected


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org