Description

Additional steps are required when referencing a hidden Attribute for the Dynamic File or Directory Config Name to generate nested output. This article will show how to do so for nested JSON, but applies to the following Receivers: 


If you want to reference an Attribute using the Cross Reference option for the file or directory name, and it must also be hidden in the output file, these additional steps are required. 

  1. Make the Attribute Visible in the Attribute Dashboard.
  2. Hide the Attribute within the Config.xml file.


Use Case Example

A tester is generating nested JSON for these four Domains: Organization, Department, User, and Address. The Organization Domain contains a 'city' Attribute that needs to be hidden from the output but cross-referenced and included in the output file name.


Step 1 - Set Attribute as Visible

At the Attribute level, make sure the Visible checkbox is checked. 


Step 2 - Disable Attribute at the Config Level

Within the Configuration File (Config.xml), disable the Attribute for the Domain in the Edit Elements window.

Follow the steps below when the configuration file has already been created: 

  • Select the Configuration Management Tab and click on the Modify JSON Elements icon.


  • Select the Edit icon for the Domain.


  • Uncheck the Attribute for the selected Domain and click Save.


Step 3 - Configure the Dynamic File or Directory Name Reference in Merge Receiver

Configure the Dynamic File and/or Directory Name cross reference for the JSONSegmentMergeReceiver in the Merge Domain. 

  • Select the JSONSegmentMergeReceiver in the Merge Domain. 
  • Select the File Config or Directory Config Tab.



  • Select the Cross Reference option and then double-click on the input field.



  • Select a Domain within the list.

  • Click on the Plus (+) to select an Attribute.



  • Click Save to finish.



Dynamic File Name Example


Dynamic Directory Name Example


Sample Output

For this example, the following data has been generated:  

  • 3 Organizations - city Attribute is hidden in the output for each Organization
  • 1 Department per Organization
  • 3 Users per Department
  • 1 Address per User


Three nested JSON files will be generated (one for each Organization). The hidden city Attribute has been used for the file name. The output files are shown below:  



Nashville File (Organization 1)

{
    "Organization": {
        "id": 1,
        "name": Organization 1,
        "address": 1000 N Washington Dr,
        "state": TN,
        "zip": 37201,
        "phoneNumber": (615) 543-7215,
        "Department": {
            "id": 1,
            "name": Department 1,
            "phoneNumber": (613) 118-1115,
            "User": [{
                "id": 1,
                "firstName": Abigail,
                "lastName": Raygoza,
                "middleInitial": A,
                "username": user1,
                "password": 6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C01E52DDB7875B4B,
                "Address": {
                    "id": 1,
                    "address": 1000 N Washington Dr,
                    "city": Columbia,
                    "state": SC,
                    "zipCode": 29201
                }
            },
            {
                "id": 2,
                "firstName": Carole,
                "lastName": Markley,
                "middleInitial": B,
                "username": user2,
                "password": D4735E3A265E16EEE03F59718B9B5D03019C07D8B6C51F90DA3A666EEC13AB35,
                "Address": {
                    "id": 2,
                    "address": 1001 S Adams Sq,
                    "city": Richmond,
                    "state": VA,
                    "zipCode": 23173
                }
            },
            {
                "id": 3,
                "firstName": Ines,
                "lastName": Nemeth,
                "middleInitial": O,
                "username": user3,
                "password": 4E07408562BEDB8B60CE05C1DECFE3AD16B72230967DE01F640B7E4729B49FCE,
                "Address": {
                    "id": 3,
                    "address": 1002 E Jefferson Ct,
                    "city": Olympia,
                    "state": WA,
                    "zipCode": 98501
                }
            }]
        }
    }
}


Columbia File (Organization 2)


{
    "Organization": {
        "id": 2,
        "name": Organization 2,
        "address": 1001 S Adams Sq,
        "state": SC,
        "zip": 29201,
        "phoneNumber": (803) 361-7233,
        "Department": {
            "id": 2,
            "name": Department 2,
            "phoneNumber": (650) 504-9579,
            "User": [{
                "id": 4,
                "firstName": Devin,
                "lastName": Abel,
                "middleInitial": B,
                "username": user4,
                "password": 4B227777D4DD1FC61C6F884F48641D02B4D121D3FD328CB08B5531FCACDABF8A,
                "Address": {
                    "id": 4,
                    "address": 1003 W Madison St,
                    "city": Trenton,
                    "state": NJ,
                    "zipCode": 08601
                }
            },
            {
                "id": 5,
                "firstName": Nga,
                "lastName": Cureton,
                "middleInitial": Y,
                "username": user5,
                "password": EF2D127DE37B942BAAD06145E54B0C619A1F22327B2EBBCFBEC78F5564AFE39D,
                "Address": {
                    "id": 5,
                    "address": 1004 NS Monroe Rd,
                    "city": Atlanta,
                    "state": GA,
                    "zipCode": 30301
                }
            },
            {
                "id": 6,
                "firstName": Violet,
                "lastName": Palladino,
                "middleInitial": U,
                "username": user6,
                "password": E7F6C011776E8DB7CD330B54174FD76F7D0216B612387A5FFCFB81E6F0919683,
                "Address": {
                    "id": 6,
                    "address": 1005 NE Adams Ave,
                    "city": Pago Pago,
                    "state": AS,
                    "zipCode": 96799
                }
            }]
        }
    }
}


Saint Paul File (Organization 3)


{
    "Organization": {
        "id": 3,
        "name": Organization 3,
        "address": 1002 E Jefferson Ct,
        "state": MN,
        "zip": 55101,
        "phoneNumber": (651) 422-4409,
        "Department": {
            "id": 3,
            "name": Department 3,
            "phoneNumber": (468) 398-6879,
            "User": [{
                "id": 7,
                "firstName": Eloise,
                "lastName": Maze,
                "middleInitial": C,
                "username": user7,
                "password": 7902699BE42C8A8E46FBBB4501726517E86B22C56A189F7625A6DA49081B2451,
                "Address": {
                    "id": 7,
                    "address": 1006 NW Jackson Blvd,
                    "city": Jackson,
                    "state": MS,
                    "zipCode": 39201
                }
            },
            {
                "id": 8,
                "firstName": Anya,
                "lastName": Cosby,
                "middleInitial": Q,
                "username": user8,
                "password": 2C624232CDD221771294DFBB310ACA000A0DF6AC8B66B696D90EF06FDEFB64A3,
                "Address": {
                    "id": 8,
                    "address": 1007 SE Van Buren Wy,
                    "city": Augusta,
                    "state": ME,
                    "zipCode": 04330
                }
            },
            {
                "id": 9,
                "firstName": Philomena,
                "lastName": Ensley,
                "middleInitial": K,
                "username": user9,
                "password": 19581E27DE7CED00FF1CE50B2047E7A567C76B1CBAEBABE5EF03F7C3017BB5B7,
                "Address": {
                    "id": 9,
                    "address": 1008 SW Harrison Ln,
                    "city": Helena,
                    "state": MT,
                    "zipCode": 59601
                }
            }]
        }
    }
}