Lookup transform not working

Hello everyone,

I have written the below lookup transform for getting the stored value based on 4 attribute combination but it is not working. can you please help on below transform.

scenario: we need to get the value from lookup using the 4 attributes combination.

{
    "id": "2dfd29a3-5a13-47d3-8f8f-9958b7dc3a5a",
    "name": "Test_lookup1",
    "type": "lookup",
    "attributes": {
        "type": "concat",
        "attributes": {
            "value": [
                {
                    "attributes": {
                        "sourceName": "Test source",
                        "attributeName": "att1"
                    },
                    "type": "accountAttribute"
                },
                ",",
                {
                    "attributes": {
                        "sourceName": "Test source",
                        "attributeName": "att2"
                    },
                    "type": "accountAttribute"
                },
                ",",
                {
                    "attributes": {
                        "sourceName": "Test source",
                        "attributeName": "att3"
                    },
                    "type": "accountAttribute"
                },
                ",",
                {
                    "attributes": {
                        "sourceName": "Test source",
                        "attributeName": "att4"
                    },
                    "type": "accountAttribute"
                },
            ]
        },
        "table": {
            "att1,att2,att3,att4": "test lookup 1",
            "att1,att2,att3,att4": "test lookup 2",
            "att1,att2,att3,att4": "test lookup 3",
            "att1,att2,att3,att4": "test lookup 4",
            "default": "Testing"
        }
    }
}

Are you getting an error or an incorrect result? If an error, what error message are you receiving? If an incorrect result, what is your expected result and what are you actually getting?

Hi @colin_mckibben,

It returns the “Default” value for all identities even if the key value matches with concat value.

Thanks & Regards,
Suresh Kiran

I think you need to wrap your concat operation in an input body in order to use it in the lookup table. I also noticed some typos and syntax issues. Try this transform logic:

{
    "id": "2dfd29a3-5a13-47d3-8f8f-9958b7dc3a5a",
    "name": "Test_lookup1",
    "type": "lookup",
    "attributes": {
        "input": {
            "type": "concat",
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "sourceName": "Test source",
                            "attributeName": "att1"
                        },
                        "type": "accountAttribute"
                    },
                    ",",
                    {
                        "attributes": {
                            "sourceName": "Test source",
                            "attributeName": "att2"
                        },
                        "type": "accountAttribute"
                    },
                    ",",
                    {
                        "attributes": {
                            "sourceName": "Test source",
                            "attributeName": "att3"
                        },
                        "type": "accountAttribute"
                    },
                    ",",
                    {
                        "attributes": {
                            "sourceName": "Test source",
                            "attributeName": "att4"
                        },
                        "type": "accountAttribute"
                    }
                ]
            }
        },
        "table": {
            "att1,att2,att3,att4": "test lookup 1",
            "att1,att2,att3,att4": "test lookup 2",
            "att1,att2,att3,att4": "test lookup 3",
            "att1,att2,att3,att4": "test lookup 4",
            "default": "Testing"
        }
    }
}

Thank you Colin McKibben…!!!