Block Properties Include Tab — Hierarchical Entities

Use the Include tab in a Query or Fetch Block to gather source hierarchical data where parent and child information is stored in a single record instead of related records, such as in an XML file.

Use the Include tab in a CreateWith Block, UpdateWith Block, or UpsertWith Block. to write parent and child data to a hierarchical datastore or use in a subsequent operation.

If the source datastore is not hierarchical, but does have relationships, see Block Properties Include Tab — Relational Data.

Source Parent/Child Relationships

On a Query Block or a Fetch Block, the Include tab shows you the shape of the Source data hierarchically and lets you select the data to be gathered. Any related entity selected on the Include tab is available on the Source side of the Fields tab for operation Blocks or in the entity drop-down in the For Each Child Block.

  1. Select Solutions from the menu.
  2. Select a Solution to open it.
  3. Scroll to the Maps section and select a Map to open it.
  4. Select a Query or Fetch Block.
  5. Select the General link in the Properties panel to open the Block Properties dialog.
  6. Select the Include tab.
  7. Select the Browse link next to an entity to display the next level down in the hierarchy.
  8. Scroll through the list of Related Entities and select the check box in the Select column to include the related entity in the data returned.

    Note: You cannot select a child without also selecting its parent. For example if the hierarchy is Country, State, City, you cannot select City without selecting State.

  9. For each related entity, the following information displays:
    • Root Entity.Relationship (Entity)— Name of the object where the Relationship between the primary entity and the related entity is stored. In hierarchical data, this name contains the path from the parent down to the children and grandchildren. For example, if the Root entity is Country, the child is State, and the grandchild is City, then the name of the object is Country.State.City (cityType).
    • Type — Type of relationship.
      • One to One — For each parent record, there is only one child record for this entity. For example, if the parent entity is Country and the child entity is Government, there is only one Government per Country. Fields from One to One relationships display on the source side of operation Blocks within this Query or Fetch Block.
      • Zero or More — For each parent record, there can be from zero to any number of child records. For example, if the parent record is Country and the child is State, there can be from zero to any number of States within a Country. Fields from Zero or More relationships show up as mappable source fields only for Blocks that are within a corresponding For Each Child Block.
    • Required— Select which records to return from the drop-down:
      • Return records with or without relationship — Returns all records for the higher-level entity whether or not there are any records for the related entity. For example, if contact is the higher-level entity and account is the related entity, all contact records are returned whether there is a related account record or not.
      • Return only records with relationship — Returns records for the higher-level entity only if there are records for the related entity. For example, if contact is the higher-level entity and account is the related entity, only contact records with at least one related account record are returned.

        In the case of multiple levels of nested entities, if a record has no related records, this affects records below it but not above it in the hierarchy. For example, assume a Country has Zero or More States, and a State has Zero or More Cities, and you have selected Return only records with relationship between the state and the city. If a particular state has no cities, the state is excluded from the source data, but this does not move up the hierarchy and cause the whole country to be excluded.

To exclude a Related Entity, make sure the Select check box for that entity is empty. Limit your selections to the data required for your Solution to improve performance.

Target Parent/Child Relationships

On a target operation Block, such as the CreateWith Block, the Include tab shows you the shape of the data as it will be written to the target. If the target datastore and associated Connector do not support hierarchical data, the Blocks listed below cannot be used. Instead you must use the traditional Create Blocks. Target operation Blocks used with hierarchical data include:

There may be some Connector specific Blocks that can be used with hierarchical data. Refer to the Help for the Connector for additional information.

Related entities selected on the Include tab of a target operation behave as follows:

Selecting Target Related Entities

  1. Select Solutions from the menu.
  2. Select a Solution to open it.
  3. Scroll to the Maps section and select a Map to open it.
  4. Select an operation Block, such as CreateWith, and add it to the Map.
  5. Select the General link in the Properties panel to open the Block Properties dialog.
  6. Select the Include tab.
  7. Select the Browse link next to a parent or child to display the next level down in the hierarchy.
  8. Scroll through the list of Related Entities and select the check box in the Select column to include the related entity in the data written to the target.

    Note: You cannot select a child without also selecting its parent. For example if the hierarchy is Country, State, City, you cannot select City without selecting State.

  9. For each related entity, the following information displays:
    • Root Entity.Relationship (Entity)— Name of the object where the Relationship between the primary entity and the related entity is stored. In hierarchical data, this name contains the path from the parent down to the children and grandchildren. For example, if the Root entity is Country, the child is State, and the grandchild is City, then the name of the object is Country.State.City (cityType).
    • Type — Type of relationship.
      • One to One — For each parent record, there is only one child record for this entity. For example, if the parent entity is Country and the child entity is Government, there is only one Government per Country. Fields from One to One relationships display on the target side of the Fields tab of CreateWith or UpdateWith Blocks.
      • Zero or More — For each parent record, there can be from zero to any number of child records. For example, if the parent record is Country and the child is State, there can be from zero to any number of States within a Country. Fields from Zero or More relationships display on the target side of Add Blocks within the CreateWith or UpdateWith Block.

Related Topics

Query Block

Fetch Block

For Each Child Block

CreateWith Block

UpdateWith Block

UpsertWith Block

Add Block