OpenRefine / OpenRefine/OpenRefine
Improve display of error message in sql export if type conversion fails
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
Describe the bug
In SQL export, you can choose the SQL type (varchar, numeric, date...) of a column. If the type of the data in one cell does not fit (ex : a word in a "numeric" column), Openrefine display a error message in a blank HTML page. It would be better to display this message in the OR interface (or to display a warning before trying to export the data).
To Reproduce
Steps to reproduce the behavior:
- Create a dataset with a word in the 1st colum
- try to export it in SQL
- in export options, define the 1st column as "Numeric"
Current Results
What results occured or were shown.
Expected behavior
A clear and concise description of what you expected to happen or to show.
Screenshots
If applicable, add screenshots to help explain your problem.
http://127.0.0.1:3333/command/core/export-rows/clipboard.sql

Desktop (please complete the following information):
- OS: Mac OS
- Browser Version: Chrome
- JRE or JDK Version:1.8.0_152
OpenRefine (please complete the following information):
- Version : OpenRefine 3.0
Datasets
If you are allowed and are OK with making your data public, it would be awesome if you can include or attach the data causing the issue or a URL pointing to where the data is.
If you are concerned about keeping your data private, ping us on our mailing list
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SQL export flow invoked through the export-rows/clipboard.sql endpoint and reproduce the failure using a word in a column configured as Numeric. Trace where the type-conversion error becomes a blank HTML page; done means the error or warning is shown in the OpenRefine interface instead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- backend, data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100