question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract CSV, with field delimiter consistent with the schema used

See original GitHub issue

Please replace this line with full information about your idea or problem. If it’s a bug share as much as possible to reproduce it.

I have this input CSV file:

fieldNameA;fieldNameB
0123;c

If I run extract the field delimiter is changed from ; to ,:

fieldNameA,fieldNameB
123,c

I think that the default way should be to have the output field separator as the one of the input.

Moreover if I have this schema, in which I set delimiter: ;

path: input.csv
name: input
profile: tabular-data-resource
scheme: file
format: csv
hashing: md5
encoding: utf-8
dialect:
  delimiter: ;
schema:
  fields:
    - type: integer
      name: fieldNameA
    - type: string
      name: fieldNameB

and then run frictionless extract input.yml --csv, I have again , as field separator and it’s inconsistent with the schema I have.

fieldNameA,fieldNameB
123,c

I think that if I use a schema, I should have a consistent output also for delimiter setting. This is related to this discussion.

Thank you

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
lwinfreecommented, Mar 28, 2022

@aborruso I’m actually going to move this issue to the frictionless-py repo, since it is about that code. (Just FYI!)

1reaction
rollcommented, Aug 30, 2022

@aborruso The v5 changes have not affected it so I’ll prioritize this now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query CSV files - Azure Synapse Analytics - Microsoft Learn
The following query shows how to read a CSV file without a header row, with a Windows-style new line, and comma-delimited columns.
Read more >
Spark Read CSV file into DataFrame
Read CSV files with a user-specified schema; Applying DataFrame ... delimiter option is used to specify the column delimiter of the CSV file....
Read more >
5 Best Methods: MySQL Export to CSV Conveniently
MySQL export to CSV: Get equipped with the 5 best methods to export your tables from MySQL to CSV through this easy to...
Read more >
Prepare a CSV File for an Import or Update in Salesforce
A record consists of a series of fields that are delimited by commas. A CSV file can contain multiple records and is referred...
Read more >
Loading CSV data from Cloud Storage | BigQuery
If you want to ignore values in a row that are not present in the table's schema, then select Unknown values. For Field...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found