seminar-wir-bauen-uns-einen.../openrefine/07_6-6.json

91 lines
2.4 KiB
JSON
Raw Normal View History

[
2017-01-05 23:42:35 +01:00
{
"op": "core/multivalued-cell-split",
"description": "Split multi-valued cells in column 020 : a",
"columnName": "020 : a",
"keyColumnName": "001",
"separator": "␟",
"mode": "plain"
},
{
"op": "core/column-addition",
2017-01-05 23:42:35 +01:00
"description": "Create column ISBN at index 2 based on column 020 : a using expression grel:value",
"engineConfig": {
2017-01-05 23:42:35 +01:00
"mode": "row-based",
"facets": [
{
"omitError": false,
2017-01-05 23:42:35 +01:00
"expression": "grel:value.length()",
"selectBlank": false,
"selection": [
{
"v": {
"v": 13,
"l": "13"
}
}
2017-01-05 23:42:35 +01:00
],
"selectError": false,
"invert": false,
"name": "020 : a",
"omitBlank": false,
"type": "list",
"columnName": "020 : a"
}
2017-01-05 23:42:35 +01:00
]
},
"newColumnName": "ISBN",
2017-01-05 23:42:35 +01:00
"columnInsertIndex": 2,
"baseColumnName": "020 : a",
"expression": "grel:value",
"onError": "set-to-blank"
},
{
"op": "core/text-transform",
2017-01-05 23:42:35 +01:00
"description": "Text transform on cells in column ISBN using expression grel:with('978'+cells[\"020 : a\"].value[0,9],v,v+((10-(sum(forRange(0,12,1,i,toNumber(v[i])*(1+(i%2*2)) )) %10)) %10).toString()[0] )",
"engineConfig": {
2017-01-05 23:42:35 +01:00
"mode": "row-based",
"facets": [
{
"omitError": false,
2017-01-05 23:42:35 +01:00
"expression": "grel:value.length()",
"selectBlank": false,
"selection": [
{
"v": {
2017-01-05 23:42:35 +01:00
"v": 10,
"l": "10"
}
}
2017-01-05 23:42:35 +01:00
],
"selectError": false,
"invert": false,
"name": "020 : a",
"omitBlank": false,
"type": "list",
"columnName": "020 : a"
}
2017-01-05 23:42:35 +01:00
]
},
"columnName": "ISBN",
2017-01-05 23:42:35 +01:00
"expression": "grel:with('978'+cells[\"020 : a\"].value[0,9],v,v+((10-(sum(forRange(0,12,1,i,toNumber(v[i])*(1+(i%2*2)) )) %10)) %10).toString()[0] )",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
2017-01-05 23:42:35 +01:00
},
{
"op": "core/multivalued-cell-join",
"description": "Join multi-valued cells in column ISBN",
"columnName": "ISBN",
"keyColumnName": "001",
"separator": "␟"
},
{
"op": "core/multivalued-cell-join",
"description": "Join multi-valued cells in column 020 : a",
"columnName": "020 : a",
"keyColumnName": "001",
"separator": "␟"
}
]