summerschool-openrefine/openrefine/marc.json

164 lines
4.0 KiB
JSON

[
{
"op": "core/column-removal",
"description": "Remove column Column",
"columnName": "Column"
},
{
"op": "core/column-addition",
"description": "Create column Subfields at index 4 based on column Content using expression grel:forEach(value.split(\"$\"),v,get(v,0)).join(\"$\")",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"mode": "text",
"caseSensitive": false,
"query": "$",
"name": "Content",
"type": "text",
"columnName": "Content"
}
]
},
"newColumnName": "Subfields",
"columnInsertIndex": 4,
"baseColumnName": "Content",
"expression": "grel:forEach(value.split(\"$\"),v,get(v,0)).join(\"$\")",
"onError": "set-to-blank"
},
{
"op": "core/text-transform",
"description": "Text transform on cells in column Content using expression grel:forEach(value.split(\"$\"),v,slice(v,1)).join(\"$\")",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"mode": "text",
"caseSensitive": false,
"query": "$",
"name": "Content",
"type": "text",
"columnName": "Content"
}
]
},
"columnName": "Content",
"expression": "grel:forEach(value.split(\"$\"),v,slice(v,1)).join(\"$\")",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/multivalued-cell-split",
"description": "Split multi-valued cells in column Content",
"columnName": "Content",
"keyColumnName": "RecordNumber",
"separator": "$",
"mode": "plain"
},
{
"op": "core/multivalued-cell-split",
"description": "Split multi-valued cells in column Subfields",
"columnName": "Subfields",
"keyColumnName": "RecordNumber",
"separator": "$",
"mode": "plain"
},
{
"op": "core/fill-down",
"description": "Fill down cells in column RecordNumber",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"omitError": false,
"expression": "isBlank(value)",
"selectBlank": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectError": false,
"invert": false,
"name": "Subfields",
"omitBlank": false,
"type": "list",
"columnName": "Subfields"
}
]
},
"columnName": "RecordNumber"
},
{
"op": "core/fill-down",
"description": "Fill down cells in column Tags",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"omitError": false,
"expression": "isBlank(value)",
"selectBlank": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectError": false,
"invert": false,
"name": "Subfields",
"omitBlank": false,
"type": "list",
"columnName": "Subfields"
}
]
},
"columnName": "Tags"
},
{
"op": "core/fill-down",
"description": "Fill down cells in column Indicators",
"engineConfig": {
"mode": "row-based",
"facets": [
{
"omitError": false,
"expression": "isBlank(value)",
"selectBlank": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectError": false,
"invert": false,
"name": "Subfields",
"omitBlank": false,
"type": "list",
"columnName": "Subfields"
}
]
},
"columnName": "Indicators"
},
{
"op": "core/blank-down",
"description": "Blank down cells in column RecordNumber",
"engineConfig": {
"mode": "row-based",
"facets": []
},
"columnName": "RecordNumber"
}
]