---
schema_version: "1"
id: a6941ba0181179afef78b7b9ed1fc930f0181bee5577efa710706b0e4877a388
title: Streaming Data Transform Functions and Operators
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_streaming_transform_supported_functions.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_streaming_transform_supported_functions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ab2cbe3df24eb6a98672717343958d386ba15de03b9705aa7e30309db87b39df
description: You can use these functions and operators in a streaming data transform SQL statement.
products:
  - Data 360
release: "264"
---
# Streaming Data Transform Functions and Operators

You can use these functions and operators in a streaming data transform SQL statement.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d161399e38">Category</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d161399e41">Function Name</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d161399e44">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Table</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>JSON_TABLE(<var>field</var>,
                  <var>rootPath</var> COLUMNS (<var>list</var>)
                  <var>alias</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Extracts values from a JSON string value into a table with specified columns. Can
              be used to create more than one table.</p>
            <p>Use these values inside the function.</p>
            <ul>
              <li><code>Field (string)</code>—The name of the field in the
                input object where the JSON values are stored. It can be any expression that
                results in a JSON string value.</li>
              <li><code>rootPath (path)</code>—The JSON path expression
                that locates properties in a JSON object.</li>
              <li><code>List (ColumnName Type PATH Path)</code>—A
                comma-separated list of columns that is within the table.<ul>
                  <li><code>ColumnName (string)</code>—The name of the
                    column in the table returned from the JSON_TABLE invocation.</li>
                  <li><code>Type</code>—The type of data being outputted.
                    Valid values are TEXT or NUMBER.</li>
                  <li><code>Path (path)</code>—The JSON path expression
                    that locates properties in a JSON object in relation to the root path.</li>
                </ul>
              </li>
              <li><code>Alias (string)</code>—The name of the table being
                created.</li>
            </ul>
            <p>Examples</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT 
  customers_with_orders__dll.order_id__c as order_id__c, 
  customers.customer as customer__c
FROM customers_with_orders__dll, JSON_TABLE(
  customers_with_orders__dll.json_data__c, '

#### See Also

- [Data Types in Data 360](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types.htm&release=264.0.0&type=5 "Data 360 supports these data types.")
- [Date and Datetime Formats](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types_and_date_formats.htm&release=264.0.0&type=5 "Data 360 supports date and datetime data types.")
- [Normalize Data with UNION Use Case](https://help.salesforce.com/s/articleView?id=data.c360_a_streaming_transform_normalization.htm&release=264.0.0&type=5 "Normalize data ingested into Data 360 with streaming data transforms.") COLUMNS (
 	customer TEXT PATH '$.customer'
	)
) customers</code></pre>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT 
  customers_with_orders__dll.order_id__c as order_id__c, 
  items.item_name as item_name__c,
  items.item_price as item_price__c
FROM customers_with_orders__dll, JSON_TABLE(
  customers_with_orders__dll.json_data__c, '$.items[*]' COLUMNS (
    item_name TEXT PATH '$.name',
    item_price NUMBER PATH '$.price'
  )
) items</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>CONCAT()</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns a concatenated string of the provided values. Accepts two or more strings
            or field API names.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>COALESCE</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns the first value from the list that isn’t empty.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TRIM(<var>text</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Removes all spaces from the text except for single spaces between words.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>RTRIM(<var>text</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Removes all spaces from the end.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>LOWER(<var>text</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Converts all uppercase letters in a text string to lowercase.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>UPPER(<var>text</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Converts all lowercase letters in a text string to uppercase.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TO_TEXT(<var>expr</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns the UTF-8 value for a text, number, boolean, date, or datetime
            expression.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">REGEXP(<var>text, pattern</var>)</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Returns true if the text matches the regular expression pattern, and false
              otherwise.Use these values with the operator.</p>
            <ul>
              <li>text (string): The text to search.</li>

              <li>pattern (string): A regular expression.</li>

            </ul>
            <p>Example</p>
            <p style="margin-bottom:0;"><code>REGEXP(order_id__c,
              '^[A-Z]{3}-[0-9]+

#### See Also

- [Data Types in Data 360](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types.htm&release=264.0.0&type=5 "Data 360 supports these data types.")
- [Date and Datetime Formats](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types_and_date_formats.htm&release=264.0.0&type=5 "Data 360 supports date and datetime data types.")
- [Normalize Data with UNION Use Case](https://help.salesforce.com/s/articleView?id=data.c360_a_streaming_transform_normalization.htm&release=264.0.0&type=5 "Normalize data ingested into Data 360 with streaming data transforms."))</code></p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Text</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">REGEXP_EXTRACT(<var>text, pattern, index</var>)</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Returns the matching group at the specified index from the text. Index 0 returns
              the entire match. Index 1 and higher return capturing groups, which are the parts of
              the pattern enclosed in parentheses.</p>
            <p>Use these values inside the function.</p>
            <ul>
              <li>text (string): The text to search. </li>

              <li>pattern (string): A regular expression.</li>

              <li>index (number): The zero-based index of the group to return.</li>

            </ul>
            <p>Example</p>
            <p style="margin-bottom:0;"><code>REGEXP_EXTRACT(order_id__c, '([A-Z]+)-([0-9]+)', 1)For
                  an order_id__c value of ORD-1042, this example returns ORD.</code></p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Datetime</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TO_DATETIME(<var>expr</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Returns the datetime value for a date, date time, or epoch
              expression.</p>
            <p>Examples</p>
            <p><strong>Date</strong></p>
            <p><code>TO_DATETIME(2023-05-15)</code> returns 2023-05-15
              00:00:00</p>
            <p><strong>Epoch</strong></p>
            <p style="margin-bottom:0;"><code>TO_DATETIME(1700127401)</code> returns 2023-11-16 09:36:41</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Datetime</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 "><code>HOUR_ADD</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Adds a number of hours to the datetime value based on the integer value of the
            second function parameter. Returns the datetime that is the number of hours after the
            start datetime.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Datetime</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 "><code>HOUR_SUB</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Subtracts a number of hours from the datetime value based on the integer value of
            the second function parameter. Returns the date that is the number of hours before the
            start datetime.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Boolean</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TO_BOOLEAN(<var>expr</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns a boolean value. Accepts boolean values or the text values “True” and
            “False.”</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Number</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TO_NUMBER(<var>expr</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns a number value for a given expression. Returns null for text, date,
            datetime, and boolean values.</td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Date</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>TO_DATE(<var>expr</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Returns a date value for a date, datetime, or epoch
              expression.</p>
            <p>Examples</p>
            <p><strong>Datetime</strong></p>
            <p><code>TO_DATE(2023-11-16 09:36:41)</code> returns
              2023-11-16</p>
            <p><strong>Epoch</strong></p>
            <p style="margin-bottom:0;"><code>TO_DATE(1700127401)</code> returns 2023-11-16</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Logic</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <p>
              <code>ISNULL()</code>
            </p>
            <p>
              <code>IFNULL()</code>
            </p>
            <p>
              <code>NULLIF()</code>
            </p>
            <p>
              <code>ISNOTNULL()</code>
            </p>
            <p style="margin-bottom:0;">Don’t compare a field to null using <code>=,!=, or &lt;&gt;</code>. These
              comparisons don’t match null values, so rows with a null in that field will be
              silently excluded or included when you don’t expect it. Always use field
              <code>ISNULL(field)</code> or <code>field ISNOTNULL(field)</code>
              instead.
            </p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>These functions test for null values.</p>
            <div>
              <p>For the text data type:</p>
              <ul>
                <li>For the <code>Text</code> data type, null values and empty strings are different. A double
                  quote without characters between them represents an empty
                  string.<code>""</code></li>
                <li>To exclude both empty strings and null values, use field <code>&lt;&gt; "" AND
                      ISNOTNULL(field)</code>.<p>In Data Explorer, both empty strings and null
                    values are displayed as <code>NULL</code>. To ensure accurate filtering,
                    it’s recommended to include checks for both null values and empty
                    strings.</p>
                </li>
              </ul>
            </div>
            <p>For number and datetime data types:</p>
            <ul>
              <li>To check for a non-null value, use <code>ISNOTNULL(field)</code>.</li>

              <li>To check for a null value, use <code>ISNULL(field)</code>.</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Logic</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>CASE WHEN</code>
            <var>statement</var>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Returns a value when the first condition is met, such as if-then-else.</p>
            <p>Example</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT 
    SourceObject.Id as id__c,
    CASE
        WHEN upper(SourceObject.Type) LIKE '%CAT%' THEN 'pet'
        WHEN lower(SourceObject.Description) LIKE '%donut%' THEN 'food'
        ELSE 'Unknown'
    END AS newProduct__c
    FROM SourceObject</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Logic</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>AND(<var>condition1</var>,
                  <var>condition2</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Logical <code>AND</code> checks to see that both conditions
              are true.</p>
            <p>Example</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT *
FROM SourceObject
WHERE (Type &lt;&gt; "" AND Comment == "")</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Logic</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>OR(<var>condition1</var>,
                  <var>condition2</var>)</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Logical <code>OR</code> checks to see if either one of the
              conditions is true.</p>
            <p>Example</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT *
FROM SourceObject
WHERE (Type &lt;&gt; "" AND Comment == "")
    OR (FirstName == "Alice" AND LastName == "Bob")</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Operators</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">Logical operators</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Greater than (<code>&gt;</code>)</p>
            <p>Greater than or equal to (<code>&gt;=</code>)</p>
            <p>Less than (<code>&lt;</code>)</p>
            <p>Less than or equal to (<code>&lt;=</code>)</p>
            <p>Equal to (<code>==</code>)</p>
            <p>Logical <code>AND</code> (<code>&amp;&amp;</code>)</p>
            <p>Logical <code>OR</code> (<code>||</code>)</p>
            <p style="margin-bottom:0;">Logical <code>NOT</code> (<code>!=</code>, <code>&lt;&gt;</code>)</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Operators</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>UNION</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">
            <p>Combine up to five <code>SELECT</code> statements. Each <code>SELECT</code>
              statement must use the same source data lake object.</p>
            <p>Example</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT Name, City
FROM AccountObject
UNION
SELECT Name, City
FROM AccountObject;</code></pre>
            <div>
              <p>To ensure records are properly updated, validate that none of the following
                conditions are present at the same time.</p><a name="c360_a_streaming_transform_supported_functions__ul_v5q_lqg_r2c"><!-- --></a>
              <ul id="c360_a_streaming_transform_supported_functions__ul_v5q_lqg_r2c">
                <li>A column across two or more SELECT blocks in the UNION evaluate to the same
                  value; and</li>

                <li>The column is used as the primary key in the target object; and</li>

                <li>The SELECT blocks contain predicates that filter the data, and each predicate
                  filters the data differently </li>

              </ul>
            </div>
          </td>

        </tr>
        <tr class="">
          <td data-label="Category" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e38 ">Date &amp; Datetime</td>

          <td data-label="Function Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e41 ">
            <code>CURRENT_DATE()</code>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d161399e44 ">Returns the current UTC date as a value of the date data type.</td>

        </tr>
      </tbody>
    </table>

#### See Also

- [Data Types in Data 360](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types.htm&release=264.0.0&type=5 "Data 360 supports these data types.")
- [Date and Datetime Formats](https://help.salesforce.com/s/articleView?id=data.c360_a_data_types_and_date_formats.htm&release=264.0.0&type=5 "Data 360 supports date and datetime data types.")
- [Normalize Data with UNION Use Case](https://help.salesforce.com/s/articleView?id=data.c360_a_streaming_transform_normalization.htm&release=264.0.0&type=5 "Normalize data ingested into Data 360 with streaming data transforms.")