jadenthem / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Using input data as column headers makes JSON history less useful #256

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Import fixed width file as single column
2. Split column based on field widths
3. Rename resulting fields
4. Save operation history using "Extract..." button under "Undo/Redo"

What is the expected output? What do you see instead?

Operation history should be reusable.

When step 1 is performed the single column takes a name based on the first 
record/line of the input file. This makes the resulting JSON output rely on the 
first record of the input file. Using it on other files results in failure.

What version of the product are you using? On what operating system?

Version 2.0 [r1836]
Windows

Please provide any additional information below.

A work around is possible:
1. Import fixed width file as single column
2. Rename column to 'column'
3. Split column based on field widths
4. Rename resulting fields
5. Save operation history using "Extract..." button under "Undo/Redo" (only 
export from step 3 onwards)

When using the exported JSON repeat steps 1 and 2 manually, then apply the JSON 
history.

Original issue reported on code.google.com by josephmd...@gmail.com on 26 Nov 2010 at 3:15

GoogleCodeExporter commented 8 years ago
What would you like to see?  An option to assign fixed column names (e.g. col1, 
col2, etc) on import perhaps?

Original comment by tfmorris on 26 Nov 2010 at 5:50

GoogleCodeExporter commented 8 years ago
Maybe specify "0" for the number of header lines before importing?

Original comment by dfhu...@gmail.com on 26 Nov 2010 at 5:52

GoogleCodeExporter commented 8 years ago
Is this possible?

* Always generate fixed column names (col1, col2…)
* Add a concept of display names to columns (a second name that the user will 
see)
* Rename operations change the display name
* Never change fixed names
* Use fixed names for JSON and all internal operations

I expect such a setup would fix issue 133 too.

Original comment by josephmd...@gmail.com on 29 Nov 2010 at 1:36

GoogleCodeExporter commented 8 years ago
> * Always generate fixed column names (col1, col2…)

This already happens if you specify "0" as the number of header lines. Does 
that not happen for you?

Original comment by dfhu...@gmail.com on 29 Nov 2010 at 5:47

GoogleCodeExporter commented 8 years ago
You are right. Setting "0" as the number of header lines is the way to go.

I missed that option. I read the checkbox text above it and completely skipped 
that option thinking it was extra details for the checkbox.

It looks like this issue is invalid. Sorry.

Original comment by josephmd...@gmail.com on 29 Nov 2010 at 10:16

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 29 Nov 2010 at 1:07