# DuckDB Array Not Supported?

**URL:** https://discourse.julialang.org/t/duckdb-array-not-supported/129508
**Category:** Data
**Created:** [May 31, 2025, 7:57pm UTC](https://discourse.julialang.org/t/duckdb-array-not-supported/129508 "2025-05-31T19:57:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![NAS](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nas/32/47432_2.png) [@NAS](https://discourse.julialang.org/u/NAS)
#### Post date: [May 31, 2025, 7:57pm UTC](https://discourse.julialang.org/t/duckdb-array-not-supported/129508/1 "2025-05-31T19:57:10Z")

</div>

I was able to use the DuckDB Appender API to insert data into a table in the form of:

```sql
CREATE OR REPLACE TABLE embeds (id INTEGER PRIMARY KEY, acc STRING, esm_embed NUMERIC(9,8)[1280])

```

where the `esm_embed` column is a vector of floats. However, when I query the table via

```julia
DBInterface.execute(dconn,"select * from embeds")

```

I get an error:

```julia
Unsupported type for duckdb_type_to_julia_type: DUCKDB_TYPE_ARRAY

```

It seems strange that the array type writes, but can’t be read back.

First question: Am I doing something wrong and this can work with correction?

Second question: If it truly isn’t supported, anybody have an idea of how hard it would be to implement? Seems like it should just be an exercise in mapping one type to another.

---

<div class="post-metadata">

### Author: ![slwu89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slwu89/32/217323_2.png) [@slwu89](https://discourse.julialang.org/u/slwu89)
#### Post date: [May 31, 2025, 9:08pm UTC](https://discourse.julialang.org/t/duckdb-array-not-supported/129508/2 "2025-05-31T21:08:55Z")

</div>

Is your DuckDB Julia package updated to the latest version? This was a recent addition, I posted about this recently [Supporting appending `Vector` in DuckDB - #3 by slwu89](https://discourse.julialang.org/t/supporting-appending-vector-in-duckdb/126511/3)

---

<div class="post-metadata">

### Author: ![NAS](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nas/32/47432_2.png) [@NAS](https://discourse.julialang.org/u/NAS)
#### Post date: [May 31, 2025, 9:55pm UTC](https://discourse.julialang.org/t/duckdb-array-not-supported/129508/3 "2025-05-31T21:55:24Z")

</div>

I’m looking specifically at the DuckDB `ARRAY` type from [DuckDB Types](https://duckdb.org/docs/stable/sql/data_types/overview).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/9/294d4b74f49a64ce93581660f641b85d5d8f6057.png)

This type is what is used for the VSS extension for vector similarity search, so I think there would be a benefit to having it integrate well with `Vector{AbstractFloat}` types in Julia.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/2/923cd8919cf1e3655053e8c352af17ea8b881329.png)

---

<div class="post-metadata">

### Author: ![era127](https://avatars.discourse-cdn.com/v4/letter/e/eb8c5e/32.png) [@era127](https://discourse.julialang.org/u/era127)
#### Post date: [June 1, 2025, 5:28am UTC](https://discourse.julialang.org/t/duckdb-array-not-supported/129508/4 "2025-06-01T05:28:01Z")

</div>

You can write a `Vector{}`, which duckdb will interpret as a LIST type and then cast to an ARRAY if that how the tables type is defined. However, if you query an ARRAY type it has a fixed length and that does not map to a Vector{} in Julia. Maybe it could map to an NTuple, but that was not implemented in that update.

If you want a Vector{} in Julia, you could try to explicitly cast the ARRAY column to a LIST in the select clause using `select esm_embed::LIST, ...`
