Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to choose field type in CSV plugin provider import #21113

Closed
qgib opened this issue Jun 25, 2015 · 6 comments
Closed

Add ability to choose field type in CSV plugin provider import #21113

qgib opened this issue Jun 25, 2015 · 6 comments
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request

Comments

@qgib
Copy link
Contributor

qgib commented Jun 25, 2015

Author Name: Regis Haubourg (@haubourg)
Original Redmine Issue: 13038

Redmine category:data_provider/delimited_text_
Assignee: Chris Crook


Hi,
when importing CSV, we often have text identifiers that are similar to numerics, ie: "09123". CSV plugin auto types this filed to numeric 9123 when we need to keep it as it should be.
It would be nive to be able to choose field type destination and have an automatic cast to this.
Currently, we need to switch to ods / xslx to keep those types, but that is not straightforward
Cheers
Régis


Related issue(s): #14176 (duplicates), #15179 (duplicates)
Redmine related issue(s): 4212, 5606


@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2018

Author Name: Johannes Kroeger (Johannes Kroeger)


This is a dupe of #14176 and #15179

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2018

Author Name: Jürgen Fischer (@jef-n)


@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2018

Author Name: Jürgen Fischer (@jef-n)


@Sallagispo
Copy link

  • 1 promotion for this. I would love to see in QGIS 3.18 an ability to manually choose field types for .csv when importing it to QGIS! I work with statistical data joined to vector areas (municipalities, zip code areas, etc.) and they often have these area codes that might start with 0. If I choose "detect field types", they are converted to numbers and beginning zeros disappear -> join doesn't work. If I don't choose "detect field types", all my statistical data is converted to strings -> extra work converting them back to numerical data. And in my country, decimal separator is comma, and it seems that to_real operator can not understand this. So I needed to edit the data in excel, save it again to .csv and import again to QGIS.
    I'm using QGIS 3.16.1 with Windows 10.

@alexbruy
Copy link
Contributor

alexbruy commented Jan 6, 2022

Fixed in #46236.

@alexbruy alexbruy closed this as completed Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants