OpenRefine / OpenRefine/OpenRefine

Improve display of error message in sql export if type conversion fails

Open
#1,801 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

export SQL/database Type: Bug
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:

  1. Create a dataset with a word in the 1st colum
  2. try to export it in SQL
  3. 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
image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.