Datahub::Factory::Command::merge - Implements the 'merge' command.
The pipeline configuration file is in the INI format and its location is provided to the application using the --pipeline switch.
--pipeline
The file is broadly divided in two parts: the first (shortest) part configures the pipeline itself and sets the plugins to use for the import, fix and export actions. The second part sets options specific for the used plugins.
This part has three sections: [Importer], [Fixer] and [Exporter]. Every section has just one option: plugin. Set this to the plugin you want to use for every action.
[Importer]
[Fixer]
[Exporter]
plugin
All current supported plugins are in the Importer and Exporter folders. For the merge command, you must set the [Fixer] plugin to Merge. The [Importer] settings are ignored.
Importer
Exporter
merge
Merge
In [plugin_fixer_Merge], two records are merged: a left record and a right record. The right record takes precedence.
[plugin_fixer_Merge]
You must set the following options:
left_record_plugin
Importer plugin to use to get the left record. Can be a Catmandu::Store or a Catmandu::Importer. Configuration options for the plugin are set in [plugin_importer_PLUGIN_NAME] (see below).
[plugin_importer_PLUGIN_NAME]
left_id_path
Path of the ID (in Fix language) in the left record after the fixes have been applied. The ID is used to look up the right record.
left_fix_file_name
Fixes to apply to the left record.
right_record_plugin
Importer plugin to use to get the right record. Can only be a Catmandu::Store.
right_fix_file_name
Fixes to apply to the right record.
Supported Importer plugins:
Supported Exporter plugins:
All plugins have their own configuration options in sections called [plugin_type_name] where type can be importer, exporter or fixer and name is the name of the plugin (see above).
[plugin_type_name]
type
name
For a list of supported and required options, see the plugin documentation.
[Fixer] plugin = Merge [Exporter] plugin = YAML [plugin_importer_MSK] file_name = '/vagrant/Datahub-Fixes/msk_test.xml' data_path = 'recordList.record.*' [plugin_importer_CollectiveAccess] endpoint = 'http://demo.collectiveaccess.com' username = 'demo' password = 'demo' [plugin_fixer_Merge] left_record_plugin = MSK left_id_path = 'lidoRecID.0._' left_fix_file_name = '/vagrant/Datahub-Fixes/msk.fix' right_record_plugin = CollectiveAccess right_fix_file_name = '/vagrant/Datahub-Factory/ca.fix' [plugin_exporter_YAML]
Copyright 2016 - PACKED vzw, Vlaamse Kunstcollectie vzw
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.
To install Datahub::Factory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Datahub::Factory
CPAN shell
perl -MCPAN -e shell install Datahub::Factory
For more information on module installation, please visit the detailed CPAN module installation guide.