BibsTransformer#
Transform MARC bibliographic records into FOLIO Instance records and prepare MARC data for loading to SRS via Data Import.
When to Use This Task#
Migrating bibliographic data from a legacy ILS with MARC21 records
Creating FOLIO Instances with corresponding SRS (Source Record Storage) records
Supporting various ILS flavors: Voyager, Sierra, Aleph, Koha, and others
Configuration#
{
"name": "transform_bibs",
"migrationTaskType": "BibsTransformer",
"ilsFlavour": "tag001",
"hridHandling": "preserve001",
"updateHridSettings": false,
"tagsToDelete": ["841", "852"],
"statisticalCodeMapFileName": "statistical_codes.tsv",
"statisticalCodeMappingFields": ["998$a$b"],
"files": [
{
"file_name": "bibs.mrc",
"discovery_suppressed": false
},
{
"file_name": "bibs_suppressed.mrc",
"discovery_suppressed": true
}
]
}
Parameters#
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The name of this task. Used to identify the task and name output files. |
|
string |
Yes |
Must be |
|
string |
Yes |
The ILS type for legacy ID handling. See ILS Flavours below. |
|
string |
No |
How to handle HRIDs. |
|
boolean |
No |
Whether to update FOLIO HRID settings after transformation. Default: |
|
array |
No |
MARC tags to remove before saving to output MARC file. |
|
string |
No |
TSV file mapping legacy codes to FOLIO statistical codes. |
|
array |
No |
MARC fields to extract statistical codes from (e.g., |
|
string |
No |
MARC field containing legacy ID when |
|
array |
Yes |
List of MARC files to process. See File Configuration. |
ILS Flavours#
The ilsFlavour parameter determines how the legacy system identifier is extracted from MARC records:
Value |
Legacy ID Source |
|---|---|
|
001 (with processing) |
|
001 |
|
907$y |
|
907$y |
|
999$c |
|
907$y |
|
001 |
|
990$a |
|
Field specified in |
|
UUID generated |
File Configuration#
Each file object in the files array supports:
Property |
Type |
Description |
|---|---|---|
|
string |
Name of the MARC file in |
|
boolean |
Mark all records from this file as discovery suppressed |
|
boolean |
Mark all records from this file as staff suppressed |
|
string |
Statistical code(s) to assign to all records. Use |
|
boolean |
Include records in the output MARC file for Data Import. Default: |
|
boolean |
Create SRS records for these bibs. Default: |
Source Data Requirements#
Location: Place MARC21 binary files (
.mrc) initerations/<iteration>/source_data/instances/Format: Standard MARC21 binary format
Encoding: UTF-8 recommended
Output Files#
Files are created in iterations/<iteration>/results/:
File |
Description |
|---|---|
|
FOLIO Instance records (one per line) |
|
MARC21 file for loading via Data Import |
|
Legacy ID to FOLIO UUID mapping |
Reports are created in iterations/<iteration>/reports/:
File |
Description |
|---|---|
|
Transformation statistics and mapping report |
|
Data issues requiring attention |
Examples#
Basic Example#
Transform MARC bibs with default HRID generation:
{
"name": "transform_bibs",
"migrationTaskType": "BibsTransformer",
"ilsFlavour": "voyager",
"files": [
{
"file_name": "bibs.mrc"
}
]
}
Preserving 001 as HRID#
{
"name": "transform_bibs",
"migrationTaskType": "BibsTransformer",
"ilsFlavour": "tag001",
"hridHandling": "preserve001",
"files": [
{
"file_name": "bibs.mrc"
}
]
}
Multiple Files with Different Settings#
{
"name": "transform_bibs",
"migrationTaskType": "BibsTransformer",
"ilsFlavour": "sierra",
"tagsToDelete": ["9XX"],
"files": [
{
"file_name": "regular_bibs.mrc",
"discovery_suppressed": false
},
{
"file_name": "suppressed_bibs.mrc",
"discovery_suppressed": true
},
{
"file_name": "equipment.mrc",
"discovery_suppressed": false,
"data_import_marc": false
}
]
}
With Statistical Code Mapping#
{
"name": "transform_bibs",
"migrationTaskType": "BibsTransformer",
"ilsFlavour": "tag001",
"statisticalCodeMapFileName": "stat_codes.tsv",
"statisticalCodeMappingFields": ["998$a", "998$b"],
"files": [
{
"file_name": "bibs.mrc",
"statistical_code": "migrated"
}
]
}
Running the Task#
folio-migration-tools mapping_files/config.json transform_bibs --base_folder ./
Next Steps#
After running BibsTransformer:
Post Instances: Use InventoryBatchPoster or BatchPoster to load Instance records
Load MARC to SRS: Use MARCImportTask to import the MARC file via Data Import
Transform Holdings: Use HoldingsMarcTransformer or HoldingsCsvTransformer
See Also#
MARC Rules Based Mapping - Customizing MARC-to-Instance mapping
Statistical Code Mapping - Mapping statistical codes from MARC
InventoryBatchPoster - Posting transformed instances
MARCImportTask - Loading MARC records to SRS