統合ルールの操作

MDエディタを使用して2つのレコードを統合するための統合ルールの作成概要と手順。

Translatable
統合ルールを使用するには、次の役職が必要です。
  • 目録管理者
統合ルールは、2つのレコードを統合する方法についての指示を提供します。When merging two records, the primary record is the record that will contain all of the merged information.The secondary record is the record whose information will be merged into the primary record.統合ルールは、プライマリレコードの情報を削除するか、セカンダリレコードからプライマリレコードに情報をコピーします。Merge rules do not affect the secondary record, which may remain after the merge; although it is typically deleted.
MDエディタを使用すると、目録者は統合ルールを作成してMARC 21レコードに適用したり、作成済みの統合ルールを適用したりすることができます。The syntax to be used for the rules is described in Merge Rules Syntax and Examples.Also, see Merge Rules in the Training section for more information.

プライマリレコード

レコードを統合するために可能なシナリオがいくつかあります。各シナリオに使用されるプライマリレコードは次のとおりです。
統合のためのプライマリレコード
シナリオ プライマリレコード
プロファイルを使用してレコードをインポートする Alma内の既存レコード
OCLC Connexionからのレコードのインポート Alma内の既存レコード
2つの既存レコードを統合する MDE(最初に開いた)の左側のペインのレコード
外部リソースを使用した目録のコピー 外部リソース
Since the primary records for importing profiles and copy cataloging (as in Searching External Resources) are essentially the opposite, a merge rule written for an import profile cannot work for copy cataloging (and vice versa).インポートプロファイルルール用と目録のコピー用に、2組の統合ルールが必要です。An example of each type of rule can be found in Examples of Rules for Import Profiles and Copy Cataloging.

Selecting merge rule in import profile.png

When you want to use a merge rule in Alma, the rule description, rather than its name, is what appears in the Merge Method dropdown and in the Choose Merge Routine dropdown (under Record Actions > Merge Records & Combine Inventory).

基本的な統合ルール

以下は基本的な統合ルールです。基本的なルールは無条件に適用することも、プライマリレコードの条件の対象に合わせて適用することもできます。ルールが適用される順序は重要です。
基本的な統合ルール
統合ルール 例 説明
削除 remove MARC."035" このフィールドを持つすべての行をプライマリレコードから削除します。
追加 add MARC."035" このフィールドを持つすべての行をセカンダリレコードからプライマリレコードに追加します。

置換

replace MARC."505"

このフィールドを持つすべての行をプライマリレコードから削除してから、このフィールドを持つすべての行をセカンダリレコードからプライマリレコードに追加します。
置換は、削除の後に追加を配置した場合とまったく同じ結果を生成しますが、"if exists"句を使用する際に、セカンダリレコードに指定されたフィールドがない場合、プライマリレコード内のフィールドは削除されません。次の例を参照してください。
replace MARC."505"
この場合は、常にプライマリレコードから505を削除します。セカンダリレコードに505が存在する場合、プライマリレコードにもこの505が含まれます。If 505 does not exist in the secondary record, the primary record contains no 505.
replace MARC."505" if exists
removes 505 from the primary record, only if 505 exists in the secondary record.セカンダリレコードに505が存在する場合、プライマリレコードにもこの505が含まれます。If 505 does not exist in the secondary record, the primary record retains its original 505.
This logic is only true when you specify a field such as MARC."505" in the Replace action.以下の置換アクションフォーマットを使用する場合、Almaは置換ルールを「IF EXISTS」が書き込まれたものとして扱います。So, for example, if you have a 260 field in the Alma primary record, a 264 field in the incoming secondary record, and you are using replace MARC.XXX, Alma keeps the 260 field and adds the 264 during merge processing (as if the "if exists" is written).
For more information see the Merge Rule Syntax table.

統合ルールの作成

このセクションで説明する手順に従い、統合ルールを作成します。
For Network Zone consortia members, users can control whether to save new rules locally or in a network institution.この選択を行うには、[レコード]または[テンプレート]領域を開き、[新規] > [配置オプション]に移動します。この選択はユーザーごとに行われることに注意してください。
統合ルールを作成する方法
  1. MDエディタページ([リソース > 目録 > メタデータエディタを開く])で、[ルール]タブを選択します。統合ルールフォルダが表示されます。
  2. Select New > Merge and enter your merge rule properties in the Merge Rule Properties dialog box.Merge rule dialog.png
  3. ルールをプライベートとして作成するか共有として作成するかを指定します。This determines in which folder the indication rule is saved.You may want to save the rule to the Private folder and test it first, before moving it to the Shared folder (by changing the Properties).Private merge rules do not appear in the Merge Method dropdown, when you want to subsequently use a merge rule in Alma.Note that the Community folder has merge rules that you can copy to create your own rules.
  4. Select Save in the dialog.The MD Editor editing pane opens.
  5. ルールの詳細を入力します。
    • ご自身の統合ルールに必要な情報を入力します。For information on the syntax to be used, see Merge Rules Syntax and Examples.
  6. [保存]を選択してください。保存された統合ルールが[ルール]タブに表示されます。The saved merge rules can be edited, deleted, duplicated (to create new merge rules), and contributed to the Community Zone for sharing (see Contributing to the Community Zone - Normalization, Merge, and Indication Rules for more information).保存済みの統合ルールのプロパティを変更するオプションもあります。
  • 正規化ルールとは異なり、統合ルールをプレビューすることはできません。

Merge Rules Syntax and Examples

統合ルールは特定の構文に従います。For a list of merge rule examples, see the examples below or Alma Merge Rule Examples.
ルールに複数のブール演算子を含めることはできますが、多数のブール演算子を選択すると、パフォーマンスが低下する可能性があります。したがって、ブール演算子は各ルールあたり200個以下に収める必要があります。

プロファイルのインポートと目録のコピーのルール例

以下は、次のようなシナリオで使用できる統合ルールの例です。このシナリオでは、基本的なメタデータを含むプライマリレコードがAlmaにあり、そのほとんどをセカンダリレコードのメタデータに置き換えます。ただし次のフィールドでは、プライマリレコードのメタデータを保持する必要があります:001、019、035、59X、9XX。
インポートプロファイルには、次のような統合ルールを使用します。
ルール「ローカルデータおよび一致するキー以外のフィールドを置換る」 when merge then replace MARC.XXX excluding "001,019,035,59X,9XX" end
Use a merge rule such as the following for copy cataloging (see Configuring External Search Resources):
ルール「ローカルデータおよび一致するキー以外のフィールドを置換る」 when merge then replace MARC."001" replace MARC."035" replace MARC."019" replace MARC."59"X replace MARC."9"XX end
上記の両方の例で、セカンダリレコードにフィールドが存在しない場合、プライマリレコードのフィールドは削除されないことに注意してください。プライマリレコードのフィールドが常に削除されるようにする場合は、ルールの「置換」ではなく、「削除」および「追加」のルールを使用します。For details, see Replace in Basic Merge Rules table.

Rule Syntax

条件とアクションは、MARCレコード、フィールド(1つ以上)、インジケーター、サブフィールド(1つ以上)、フィールド/サブフィールドの内容などのレコード要素に適用されます。
条件はプライマリレコードの要素に適用されます。レコード要素にアクションを適用するには、要素が以下の表の構文と一致する必要があります。
統合ルールの構文
表現 意味
add MARC."{tag}" {tag}で指定されたフィールドのコンテンツを追加します。
次の例では、950フィールドのコンテンツを追加します:
add MARC."950"
add MARC."{tag}"("{ind1}","{ind2}") Add the content of the field specified in the {tag}, as well as the stipulated indicators .
次の例では、インジケータ0および1を使用して、950フィールドのコンテンツを追加します。
add MARC."950"("0","1")
add MARC."{TAG}"("{ind1}","{ind2}") if does not exist
フィールドとインジケーターがプライマリレコードにまだ存在しない場合にのみ、{tag}で指定されたフィールドを追加します。プライマリレコードにフィールドがなく、セカンダリレコードに同じタグとインジケータを持つ2つのフィールドがある場合、両方のフィールドが追加されます。
次の統合シナリオの例では、プライマリレコードにタグとインジケータが既に存在するため、プライマリレコードは変更されません。
Syntax:add MARC."600"("0","0") if does not exists
Primary record:600 00 $a history
Secondary record:600 00 $a history of Israel
add MARC."{TAG}" excluding {ind1} "{comma separated values}" excluding {ind2} "{comma separated values}" excluding subfield ("{subfield}","{subfield value}")
{tag}で指定されたフィールドのすべての固有値を追加します。ただし、最初のインジケーターの特定の値、2番目のインジケーターの特定の値、またはサブフィールドの1つに特定の値がある場合を除きます。フィールドを除外するには、すべての条件を満たす必要があります。それぞれの間に暗黙的にANDが存在します。3つの条件は必須ではありません。1つまたは2つだけが存在する可能性があります。
たとえば、追加するセカンダリレコード#1には固有の655フィールド値はなく、追加するセカンダリレコード#2には固有の655フィールド値があります。以下の例の構文は、2つの条件のみを使用することに注意してください。
Syntax:add MARC."655" excluding second indicator "7" excluding subfield ("2","local")
Secondary record #1:655_7 $a Art stories.$2 local
Secondary record #2:655_7 $a Irish stories.$2 fast
add MARC."{tag}" if does not exists {tag}で指定されたフィールドのコンテンツを、このフィールドが存在しない場合に追加します。
たとえば、次の例は、950フィールドがまだ存在しない場合に追加します。
add MARC."950" if does not exists
add MARC."{prefix}"X 接頭語{prefix}でフィールドにコンテンツを追加します。
次の例では、920〜929の全フィールドのコンテンツが追加されます。
add MARC."92"X
add MARC."{prefix}"XX 接頭語{prefix}でフィールドにコンテンツを追加します。
次の例では、900〜999の全フィールドのコンテンツが追加されます。
add MARC."9"XX
add MARC."{prefix}"X excluding "{list}" 指定されたフィールドとサブフィールドを除き、接頭語{prefix}が付いたフィールドのコンテンツを追加します。
次の例では、990〜991のコンテンツを除く、990〜999の全フィールドのコンテンツが追加されます。
add MARC."99"X excluding "990,991"
add MARC."{prefix}"XX excluding "{list}" 指定されたフィールドとサブフィールドを除き、接頭語{prefix}が付いたフィールドのコンテンツを追加します。
次の例では、950と951を除く、900〜999の全フィールドのコンテンツが追加されます:
add MARC."9"XX excluding "950,951"
add MARC."{tag}" when MARC."{condtag}"."{condsf}" contains "{condstring}" 指定されたフィールド/サブフィールドに特定の文字列が含まれる場合、{tag}で指定されたフィールドを追加します。
次の例では、250.aフィールドに"history"というテキストが含まれている場合にのみ950タグが追加されます。
add MARC."950" when MARC."250"."a" contains "history"
remove MARC."{prefix}"X 接頭語{prefix}が付いたフィールドを削除します。
次の例では、920〜929の全フィールドが削除されます。
remove MARC."92"X
remove MARC."{prefix}"XX 接頭語{prefix}が付いたフィールドを削除します。
次の例では、900〜999の全フィールドが削除されます。
remove MARC."9"XX
remove MARC."{tag}" {tag}で指定されたフィールドを削除します。
次の例では、950フィールドを削除します。
remove MARC."950"

remove MARC."{TAG}" excluding "{excluded field}"("{ind1}","{ind2}")

指定されたフィールドとインジケーターのリストを除き、{tag}で指定されたフィールドを削除します。

次の例では、650フィールドを削除します。ただし、650フィールドのフィールドのうち、ファースト・インジケータ1、ファースト・インジケータ0およびセカンド・インジケータ1、セカンド・インジケータ2、インジケータなしのフィールドは除きます:

remove MARC."650" excluding "650"("1"," ")

remove MARC."650" excluding "650"("0","1")

remove MARC."650" excluding "650"(" ","2")

remove MARC."650" excluding "650"(" "," ")

remove MARC."{TAG}" if not exists subfield "{comma separated values}"
{comma separated values} で指定された(1つまたは複数の)サブフィールドが存在しない場合、プライマリレコードから{tag}で指定されたフィールドを削除します。複数のサブフィールドが指定されている場合、条件を満たすためにすべてのサブフィールドが存在する/存在しない必要があります。
たとえば、サブフィールド5が存在しない場合、プライマリレコードである次の700フィールドが削除されます。
Syntax:remove MARC."700" if not exists subfield "5"
Primary record #1:700 1_ $a Burgess, Anne.
remove MARC."{TAG}" if exists subfield "{comma separated values}"
{comma separated values} で指定された(1つまたは複数の)サブフィールドが存在する場合、{tag}で指定されたフィールドをプライマリレコードから削除します。複数のサブフィールドが指定されている場合、条件を満たすためにすべてのサブフィールドが存在する/存在しない必要があります。
たとえば、サブフィールド5が存在する場合、プライマリレコードである次の700フィールドが削除されます。
Syntax:remove MARC."700" if exists subfield "5"
Primary record:700 1_ $a Jefferson, Thomas, $d 1743-1826, $e former owner.$ 5MH
remove MARC."{prefix}"X excluding "{list}" 指定されたフィールドのリストを除き、接頭語{prefix}が付いたフィールドを削除します
次の例では、990と991を除く、990〜999のすべてのフィールドが削除されます。
remove MARC."99"X excluding "990,991"
remove MARC."{prefix}"XX excluding "{list}" Remove the fields prefixed by {prefix}, excluding the specified list of fields.
次の例では、950と951を除く900〜999のすべてのフィールドが削除されます。
remove MARC."9"XX excluding "950,951"
次の例では、001、084、773、および980-999を除くすべてのフィールドを削除します。
remove MARC."XXX" excluding "001,084,773,98X,99X"
remove MARC."{prefix}"XX excluding "{excluded field}"("{ind1}","{ind2}") Remove the fields prefixed by {prefix}, excluding the specified list of fields and indicators.
たとえば、以下は6XXフィールドを削除します。ただし、650フィールドのうち、ファースト・インジケータ1、ファースト・インジケータ0、およびセカンド・インジケータ1、セカンド・インジケータ2、インジケータなしのフィールドを除きます。
remove MARC."6"XX excluding "650"("1"," ")
remove MARC."6"XX excluding "650"("0","1")
remove MARC."6"XX excluding "650"(" ","2")
remove MARC."6"XX excluding "650"(" "," ")
replace MARC."{tag}" if exists フィールドがセカンダリレコードに存在する場合にのみ、{tag}で指定されたフィールドのコンテンツを置き換えます。フィールドがセカンダリレコードに存在しない場合、プライマリレコードのフィールドは残ります。
For example, the following replaces the 950 field in the primary record, if the field exists in the secondary record
replace MARC."950" if exists
replace MARC."{tag}" {tag}で指定されたプライマリレコードのフィールドのコンテンツを置き換えます。If the field does not exist in the secondary record, the primary record will contains no {tag} field.
たとえば、以下がプライマリレコードで950フィールドを置き換えます:
replace MARC."950"
replace MARC."{prefix}"X if exists これらのフィールドがセカンダリレコードに存在する場合、{prefix}の接頭語が付いたフィールドのコンテンツを置き換えます。If these fields do not exist in the secondary record, the {prefix} fields of the primary record remain.
たとえば、これらのフィールドがセカンダリレコードに存在する場合、プライマリレコードの920〜929のすべてのフィールドを置き換えます:
replace MARC."92"X if exists
replace MARC."{prefix}"X Replace the content of the primary record's fields prefixed by {prefix}.If these fields do not exist in the secondary record, the primary record will contain no {prefix} fields.
たとえば、以下がプライマリレコードで920〜929の全フィールドを置き換えます:
replace MARC."92"X
replace MARC."{prefix}"XX if exists これらのフィールドがセカンダリレコードに存在する場合、{prefix}の接頭語が付いたプライマリレコードのフィールドのコンテンツを置き換えます。If these fields do not exist in the secondary record, the {prefix} fields of the primary record remain.
たとえば、これらのフィールドがセカンダリレコードに存在する場合、プライマリレコードの900〜999のすべてのフィールドを置き換えます:
replace MARC."9"XX if exists
replace MARC."{prefix}"XX {prefix}の接頭語が付いたプライマリレコードのフィールドのコンテンツを置き換えます。If these fields do not exist in the secondary record, the primary record will contain no {prefix} fields.
たとえば、以下がプライマリレコードで900〜999の全フィールドを置き換えます:
replace MARC."9"XX
replace MARC."{prefix}"X excluding "{list}" Replace the content of the primary record's fields prefixed by {prefix}, excluding the specified fields.
例えば、以下が990〜991のフィールドを除く、プライマリレコードの990〜999のすべてのフィールドのコンテンツを置き換えます。フィールドがセカンダリレコードに存在しない場合、それらはプライマリレコードに作成されることに注意してください:
replace MARC."99"X excluding "990,991"
replace MARC."{prefix}"XX excluding "{list}" 指定されたフィールドを除いて、{prefix}の接頭語が付いたプライマリレコードのフィールドのコンテンツを置き換えます。
例えば、以下が950〜951のフィールドを除く、プライマリレコードの900〜999のすべてのフィールドのコンテンツを置き換えます。フィールドがセカンダリレコードに存在しない場合、それらはプライマリレコードに作成されることに注意してください:
replace MARC."9"XX excluding "950,951"
replace MARC.XXX excluding "{list}" Replace the content of all primary record's MARC fields, excluding the specified fields.
次の例は、指定されたフィールドを除き、プライマリレコードのすべてのフィールドの内容をセカンダリレコードの内容に置き換えます。フィールドがセカンダリレコードに存在しない場合、それらはプライマリレコードに作成されることに注意してください:
replace MARC.XXX excluding "100,245,9XX,5XX"
replace MARC."{prefix}"X excluding MARC."{exclTag}"("{ind1}","{ind2}") Replace the content of primary record's fields prefixed by {prefix}, excluding the specified fields and indicators.
次の例は、セカンダリレコードの995(0,1)MARCフィールドを除き、プライマリレコード内の990〜999のすべてのフィールドのコンテンツを置き換えます。MARCフィールド995(1,1)が置き換えられていることに注意してください。
If the fields do not exist in the secondary record, they are created in the primary record:
replace MARC."99"X excluding MARC."995"("0","1")
replace MARC."{prefix}"XX excluding MARC."{exclTag}"("{ind1}","{ind2}") 指定されたフィールドとインジケータを除く、{prefix}の接頭語が付いたプライマリレコードのフィールドのコンテンツを置き換えます。
次の例は、セカンダリレコードの995(0,1)MARCフィールドを除き、プライマリレコード内の900〜999のすべてのフィールドのコンテンツを置き換えます。MARCフィールド995(1,1)が置き換えられていることに注意してください。
フィールドがセカンダリレコードに存在しない場合、プライマリレコードに作成されます:
replace MARC."9"XX excluding MARC."995"("0","1")
replace MARC."{tag}" excluding MARC."{exclTag}"("{ind1}","{ind2}") 指定されたフィールドとインジケータを除き、{tag}で指定されたプライマリレコードのフィールドを置き換えます。
次の例は、995(0,1)を除き、プライマリレコードの995フィールドの内容をセカンダリレコードの内容に置き換えます。MARCフィールド995(1,1)が置き換えられていることに注意してください。
フィールドがセカンダリレコードに存在しない場合、プライマリレコードに作成されます:
replace MARC."995" excluding MARC."995"("0","1")
replace MARC."{tag}" when MARC."{condtag}"."{condsf}" contains "{text}" excluding MARC."{exclTag}"("{ind1}","{ind2}") 指定された文字列を含むプライマリレコードのフィールドの内容を、指定された文字列を含むセカンダリレコードに置き換えます。If the secondary record does not have a field with the specified string, the primary record's fields that contains the specified string is removed.

例:

replace MARC."035" when MARC."035"."a"contains"OCoLC" excluding MARC."035"("9","9")

replace MARC.XXX excluding MARC."{exclTag}"("{ind1}","{ind2}") 指定されたフィールドとインジケータを除く、すべてのプライマリレコードのMARCフィールドのコンテンツを置き換えます。
次の例は、995(0,1)を除き、プライマリレコードのすべてのフィールドの内容をセカンダリレコードの内容に置き換えます。MARCフィールド995(1,1)が置き換えられていることに注意してください。
フィールドがセカンダリレコードに存在しない場合、プライマリレコードに作成されます:
replace MARC.XXX excluding MARC."995"("0","1")
replace MARC.control."{ctrl}" 指定されたプライマリレコードのMARCコントロールフィールドを置き換えます。
次の例は、プライマリレコードのMARC 008コントロールフィールドの内容を、セカンダリレコードの内容に置き換えます。
フィールドが存在しない場合は作成されます。
replace MARC.control."008"
replace MARC.control.position."LDR.{starting position,length}" プライマリレコードのコントロールフィールド内の特定の位置を置き換えます。これは位置の開始と長さを指定することにより実行できます。
次の例は、位置8から始まり2位置の長さのプライマリレコードのコントロールフィールドで指定されているものをセカンダリレコードのコントロールフィールドに置き換えます。
replace MARC.control.position."LDR.{8,2}"