Split your import data into multiple object types

2. オブジェクト タイプと属性マッピングを作成する

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

You can split your import data into different object types using Assets Query Language (AQL). This allows you to load multiple object types from a single source of data and avoid creating separate import files and configurations for different object types on an object schema.

このページの内容

For testing purposes, you can use the following CSV file sample. This file includes the information about two types of devices: servers and computers.

CSV のサンプル
Name, Type
Dell Server 1, Server
HP Server 1, Server
Compaq, Computer
Mac PC, Computer
Dell Server 2, Server
Mac PC 2, Computer

このインポート データには、サーバー オブジェクトのみを表示できる Server と、コンピューター オブジェクトのみを表示できる Computer という 2 つの異なるオブジェクト タイプが必要になる場合があります。この方法でデータを分割するには、CSV ファイルの [Type] 列に従ってオブジェクトをマッピングします。

このインポートを分割すると、次のような構成が表示されます。

インポート データを 2 つのオブジェクト タイプに分割

Preparing object types

データのインポート ソースを分割する前に、インポート データが正しくマッピングされるようにオブジェクト タイプを設定する必要があります。たとえば、CSV ファイルにサーバーコンピューターの両方のオブジェクト タイプが含まれている場合は、それぞれのタイプを個別に設定する必要があります。オブジェクト タイプを準備するには、次の手順に従います。

  1. オブジェクト タイプをまだ作成していない場合は作成します。オブジェクト タイプを作成する方法については、こちらをご確認ください。

  2. オブジェクト タイプの右上隅にある [属性] に移動します。

  3. [属性] タブで、インポート設定においてオブジェクト タイプを分離する属性を追加します。この例では、「Type」属性でコンピューターとサーバーを分離します。

Attributes tab in the object type settings

You must add attributes to all the object types that you want to use to split your import data.

これにより、アセットで、同じインポート データ ソースから複数のオブジェクト タイプを読み取り、それらを適切なオブジェクト タイプにマッピングできるようになります。オブジェクト タイプの準備ができたら、インポート設定に戻り、オブジェクト タイプと属性のマッピングを作成します。

Creating object type and attribute mapping to split your data

このステップでは、データをオブジェクト タイプとその属性にマッピングします。独自のマッピングを作成することも、定義済みの構造と設定を使用することもできます。オブジェクト タイプと属性マッピングの作成方法をご確認ください。

Import configuration window

When the object type and attribute mapping are ready, you can split your import data by using the Assets Query Language (AQL).

Splitting import data by attributes

アセット クエリ言語 (AQL) を使用してインポートするデータを分割できるようになりました。たとえば、「コンピューター」オブジェクト タイプにデータをインポートする場合は、コンピューターのみをインポートして、サーバーを除外することを選択できます。

You need to repeat the steps below for all the object types mappings you want to use to split your import data.

To split your data:

  1. In your import configuration, open the object type mapping.

  2. In the upper-right corner of your type mapping configuration, open Settings , then select Configure.
    インポート設定の [Configure (設定)] ボタン

  3. [データ ソースを AQL で絞り込む] フィールドで、AQL を使用してインポート データをフィルタリングします。
    たとえば、オブジェクト タイプ属性を「Type」として、インポート データをコンピューターのみでフィルタリングする場合、AQL フィルターは Type = Computer になります。アセット クエリ言語 (AQL) については、こちらをご確認ください。

    You can’t filter data based on the object references.

    [データ ソースを AQL で絞り込む] フィールド

  4. Select Update Object Type Mappings (or Create Object Type Mappings if this is a new mapping).

  5. オブジェクト タイプ マッピングのロケーターを定義して、[追加] を選択します。
    たとえば、データのインポート元に Type という名前のデータ ロケーター (CSV ファイルの場合は列の名前) が含まれており、オブジェクト タイプ属性にも Type という名前が付いている場合、オブジェクト タイプ Computers は [Type] 列の情報に基づいてインポート データをフィルタリングします。

Locator field to split data

Once you've set the AQL filter and added the data locator to the mapping, Assets will organize your import data and divide it into the specified object types. However, you won’t see the imported data yet. You still need to inspect and sync your import.

次のステップ

マッピングの準備が整ったら「3. インポート設定を検査する」に移動します。

最終更新日: 2025 年 2 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.