How can I select arrays data?

I have data that is stored in the form of Arrays.

POST _sql?format=json

{
  "query": """SELECT components.keyword FROM "issue" WHERE resolution_date >= '2023-12-31T15:00:00Z' AND resolution_date < '2024-11-04T00:19:00Z'  """,
  "fetch_size": 10000
}

When I try to retrieve it with the above query statement, I get the following error.

"Arrays (returned by [components.keyword]) are not supported"

Is there any other good way to do this?

Hi @Gerrard81 , welcome!!

I don't know which version of ES you use, but with ES|QL you can create a query to get the array:
Ex:

POST _query?format=txt
{
    "query": """
    FROM issue
    | WHERE resolution_date >= "2023-12-31T15:00:00Z" AND resolution_date < "2024-11-04T00:19:00Z"
    """
}

Using SQL API you have the array limitation. See about field_multi_value_leniency.

Thank you, I was able to solve the problem.