Issues related to the usage of DuckDB (www.duckdb.org)
Questions tagged [duckdb]
180 questions
1
vote
0 answers
DuckDB `explain analyze` total time and operator time discrepancy
When I use explain analyze to profile a join query:
D create or replace table r1 as select range, (random()*100)::UINT8 as r from range(0,500000);
D create or replace table r2 as select range, (random()*100)::UINT8 as r from range(0,500000);
D…

egor10_4
- 331
- 2
- 9
1
vote
2 answers
Set read only connection to duckdb in dbeaver
I'm working in python with duckdb and would like to use dbeaver alongside in read only mode. Where in dbeaver can I alter the config for duckdb, it doesn't appear in same location as Postgres ?
What I've tried:
Create data in python close…

mapping dom
- 1,737
- 4
- 27
- 50
1
vote
1 answer
How to updated a table (accessed in pandas) in DuckDB Database?
I'm working on one of use case, I have a larger volumes of records created in a duckdb database table, these tables can be accessed in pandas dataframe, do the data manipulations and send them back to DB table. here below I will explain my case.
I…

myamulla_ciencia
- 1,282
- 1
- 8
- 30
1
vote
0 answers
Unable to access tables written to duckdb when starting new R session (but .duckdb file is not empty)
I am having trouble with Duckdb (through R) since I have changed computer and reinstalled all of my software.
I have a local duckdb connection through which I am writing datasets (with DBI). For example:
path_db <-…

rmathers
- 11
- 2
1
vote
1 answer
Could a multi-page Streamlit app pages share Duckdb file without problems?
Hi I am running a Streamlit app with DuckDB persisted on a file. The app is is growing quite large, If I split it into a multi-page app, will it be problematic with database files locks and such, given DuckDB stores the data on a single file? Are…

Tofusoul
- 123
- 6
1
vote
3 answers
extraction for array in json
CREATE TABLE example (j JSON);
INSERT INTO example VALUES
('{
"family": "anatidae",
"species": [
{"name": "duck", "animal": true},
{"name": "goose", "animal": true},
{"name": "rock", "animal": false}
]
}'
);
How…

Dmitry Petrov
- 1,490
- 1
- 19
- 34
1
vote
1 answer
How to query bytearray data in pandas dataframe using duckdb?
df_image : is a pandas data frame with a column labelled 'bytes', which contains image data in bytearray format.
I display the images as follows:
[display(Image(copy.copy(BytesIO(x)).read(),width=300,height=170)) for x in df_image['bytes']]
Now I…

tinker
- 11
- 2
1
vote
1 answer
DuckDB - efficiently insert pandas dataframe to table with sequence
CREATE TABLE temp (
id UINTEGER,
name VARCHAR,
age UINTEGER
);
CREATE SEQUENCE serial START 1;
Insertion with series works just fine:
INSERT INTO temp VALUES(nextval('serial'), 'John', 13)
How I can use the sequence with pandas…

Dmitry Petrov
- 1,490
- 1
- 19
- 34
1
vote
1 answer
How to bulk load list values into DuckDB
I have a CSV file that looks like this:
W123456,{A123,A234,A345}
W2345567,{A789,A678,A543}
I have python code that tries to load this csv file:
import duckdb
con = duckdb.connect(database='mydb.duckdb', read_only=False)
con.execute('CREATE TABLE…

Sol
- 985
- 2
- 10
- 20
1
vote
2 answers
Unable to Install DuckDB using Python PIP
Everything goes fine until the following lines:
Installing collected packages: duckdb
Running setup.py install for duckdb ... \
And it is stuck. Nothing moves.
Please, I seek help from Python community members.
Is there any other way to install it…

Raj Kumar Pandit
- 25
- 1
- 6
1
vote
3 answers
How to import a .sql file into DuckDB database?
I'm exploring DuckDB for one of my project.
Here I have a sample Database file downloaded from https://www.wiley.com/en-us/SQL+for+Data+Scientists%3A+A+Beginner%27s+Guide+for+Building+Datasets+for+Analysis-p-9781119669364
I'm trying to import…

myamulla_ciencia
- 1,282
- 1
- 8
- 30
1
vote
1 answer
DuckDB python API: query composition
Suppose I use DuckDB with python, for querying an Apache parquet file test.pq with a table containing two columns f1 and f2.
r1 = duckdb.query("""
SELECT f1 FROM parquet_scan('test.pq') WHERE f2 > 1
""")
Now I would like to use r1 result in another…

M. Page
- 2,694
- 2
- 20
- 35
1
vote
1 answer
Is there a way to group by intervals of 15 min in DuckDB?
I made a table with
create table counter (
createdat TIMESTAMP,
tickets INT,
id VARCHAR
)
and I would like to group the rows by intervals of 15 min, so I am trying to do it with:
SELECT
SUM(tickets) AS total,
extract(year from…

Jaox
- 90
- 1
- 9
1
vote
2 answers
Transfer a SQLServer table directly to DuckDB in R
I've been reading into DuckDB recently and most of the examples involve having some sort of data already in an R session, then pushing that data into DuckDB.
Here is a basic example of that using the iris dataset;
library("DBI")
con =…

Abraham Mathew
- 51
- 3
1
vote
1 answer
Pool: Can't open database
I am trying to use pool to connect to my DuckDB/SQLite database .
con <- pool::dbPool(
drv = duckdb::duckdb(),
dbname = "data",
host = "FINAL_data.duckdb")
when I then type
dplyr::tbl(con,"data")
I can't open the database.
Error in…

HCAI
- 2,213
- 8
- 33
- 65