---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/array-constructor.md
cuppy_section: docs
cuppy_doc: WPQK-22GF
cuppy_doc_uuid: 9d4493bf-eef4-4080-ad83-5f3cd47b876d
cuppy_permalink: https://cuppy.io/salesforce/d/WPQK-22GF
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/array-constructor
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 868887cf6266002b31a111637293a6437d52190b7ab672991888fe5e11d28678
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array-constructor.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## Array Constructor

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Creates an array from a comma-separated list of values.

*   `<element1>, <element2>, ..., <elementN>`: Values to include in the array. All elements must be of compatible types that can be coerced to a common element type.

Returns an `ARRAY` that contains the specified elements. Data 360 SQL automatically infers the array type from the provided elements.

*   All array elements must be of compatible types.
*   Elements can be literals, column references, or expressions.
*   Empty arrays can be created with `ARRAY[]`.
*   Arrays can contain `NULL` values.
*   Type coercion applies when elements are of different but compatible types.
*   If no `null` values are in the constructor, Data 360 SQL infers the element type as `not null`.
*   Arrays are limited to 4 GB in size
*   Arrays cannot be nested (see [Array Type](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array.html#limitations)).

Create a simple array of numeric values.

Returns `[1,2,3,4,5]`

Create an array from string literals.

Returns `["apple","banana","cherry"]`

Create an array from multiple columns in a query.

Use expressions within the array constructor.

Create an empty array with an explicit integer type.

Returns `[]`

Arrays can contain NULL elements.

Returns `[1,NULL,3,NULL,5]`

When elements are of different but compatible types, automatic type coercion occurs.

Returns `[1.0,2.5,3.0]` - all elements coerced to decimal type.

*   [Array Data Type](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array.html) - Complete documentation on array types including constructor syntax
*   [Array Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/arrays.html) - Overview of all array functions
*   [`ARRAY_GENERATE_SERIES`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array-generate-series.html) - Generate arrays programmatically
*   [Type Conversion](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/type-conversion.html) - Type casting and coercion


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
