---
schema_version: "1"
id: 3e214cf6805d6e1e835ad93d3b770b7ac01d4870a01ff5566fea85c262a2fb56
title: DynamoDB Qualifier Examples for Parsing Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/dynamodb_qualifiers_formulaexample.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.dynamodb_qualifiers_formulaexample.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 61be760f20592dbe272cdede337801f43d3f26a0c3eb7146be36316f3a07e799
description: This example shows a simple formula to concatenate two text values. The value of the location virtual attribute is evaluated using the values of city and state attributes. For example, if city is Los Angeles and state is California, location value is defined as Los Angeles, California.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# DynamoDB Qualifier Examples for Parsing Formulas

This example shows a simple formula to concatenate two text values. The value of the `location` virtual attribute is evaluated using the values of `city` and `state` attributes. For example, if city is Los Angeles and state is California, location value is defined as Los Angeles, California.

```
{
  "columns": {
    "city": {
      "presence": "any",
      "type": "S",
      "values": [{
        "definition": "LEFT(location, FIND(",", location)-1)"
      }]
    },
    "state": {
      "presence": "any",
      "type": "S",
      "values": [{
        "definition": "MID(location, FIND(", ", location)+2, LEN(location))"
      }]
    },
    "location": {
      "virtual": "true",
      "values": [{
        "definition": "city+", "+state"
      }]
    }
  }
}
```

This example depicts use of parsing formulas to decode an address stored in a single attribute in Amazon DynamoDB. The `data` field captures the street address as _country#region#city#address_ for querying purposes. For example, USA#MI#Ann Arbor#707 Oxford Rd.

```
{
  "columns": {
    "pk": {
      "filter": "suppliers#%",
      "values": [
        {
          "definition": ""suppliers#" +supplier"
        }
      ]
    },
    "sk": {
      "presence": "exists",
      "values": [
        {
          "definition": ""SUPPLIER""
        }
      ]
    },
    "supplier": {
      "virtual": true,
      "type": "S",
      "values": [
        {
          "definition": "MID(pk, FIND("#", pk) + 1, LEN(pk))"
        }
      ]
    },
    "data": {
      "presence": "any",
      "type": "S",
      "values": [
        {
          "definition": "country + "#" + region + "#" + city + "#" + address"
        }
      ]
    },
    "country": {
      "virtual": true,
      "type": "S",
      "values": [
        {
          "definition": "LEFT(data, FIND("#", data)-1)"
        }
      ]
    },
    "region": {
      "virtual": true,
      "type": "S",
      "values": [
        {
          "definition": "MID(data, FIND("#", data)+1, FIND("#", data, FIND("#", data)+1)-FIND("#", data)-1)"
        }
      ]
    },
    "city": {
      "virtual": true,
      "type": "S",
      "values": [
        {
          "definition": "MID(data, FIND("#", data, FIND("#", data)+1)+1, FIND("#", data, FIND("#", data, FIND("#", data)+1)+1)-FIND("#", data, FIND("#", data)+1)-1)"
        }
      ]
    },
    "address": {
      "virtual": true,
      "type": "S",
      "values": [
        {
          "definition": "RIGHT(data, LEN(data)-FIND("#", data, FIND("#", data, FIND("#", data)+1)+1))"
        }
      ]
    }
  }
}
```

#### See Also

- [_Amazon DynamoDB Developer Guide_: Using the BEGINS\_WITH Function with PartiQL for DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ql-functions.beginswith.html)
- [Manage Qualifiers for Salesforce Connect Adapter for Amazon DynamoDB](https://help.salesforce.com/s/articleView?id=platform.dynamodb_manage_qualifiers.htm&release=264.0.0&type=5 "Amazon DynamoDB uses unique design patterns to model data efficiently that support multiple table and single table designs. To make data stored in Amazon DynamoDB table accessible to external objects, use qualifiers to reinterpret external data. The qualifiers describe the item attributes and indicates whether an item belongs to the schema represented by the external object. For multiple-table schema designs, the table qualifier is optional.")