Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuckDB blob visualization crashes DBeaver #36545

Open
amoradell opened this issue Dec 13, 2024 · 2 comments
Open

DuckDB blob visualization crashes DBeaver #36545

amoradell opened this issue Dec 13, 2024 · 2 comments

Comments

@amoradell
Copy link

Description

I have imported data in a DuckDB database with python and a table contains a BLOB field
When I try to vizualize Blob (Ctrl-Alt-F2 window), Dbeaver crashes without any message

DBeaver Version

Community Edition 24.3.0

Operating System

Windows 10

Database and driver

  • Database DuckDB
  • Drivers : duckdb_jdbc-1.1.3.jar

Steps to reproduce

  • Create table with a Blob field
  • Import data in this table (I have used python or duckdb)
  • Open table with DBeaver and select blob field and show window value (Ctrl-Alt-F2)
  • Navigate and click another blob field

Additional context

I tried to reproduce directly with a simple script

CREATE TABLE ZZBLOB (
	ID int64 NOT NULL,
	FILENAME varchar(100),
	CONTENT blob,
	CONSTRAINT ZZBLOB_PK PRIMARY KEY (ID)
);

insert into ZZBLOB(ID, FILENAME) values (1, 'DBEAVER_editor_encoding.png');

-- DBEAVER_editor_encoding.png, a print screen, file size : 29,7 Ko (30 487 octets)
-- no problem in DBeaver to read content
with cte as (select content from read_blob('DBEAVER_editor_encoding.png'))
update ZZBLOB set content=(select content from cte) where id =1;


insert into ZZBLOB(ID, FILENAME) values (2, 'RTF1.5SPEC');

-- RTF-Spec-1.5.pdf, file size : 381 Ko (390 583 octets)
with cte as (select content from read_blob('RTF-Spec-1.5.pdf'))
update ZZBLOB set content=(select content from cte) where id =2;
-- crash when trying to visualize content in DBeaver
@amoradell
Copy link
Author

amoradell commented Dec 13, 2024

It's possible to read an entire folder with several files (.pdf, .jpg, .docx, ...)

create table ZZBLOB2 as select size, content, filename from read_blob('/path/*');

And I was able to export table in csv from DBeaver with binary files exported to .data files

@ShadelessFox
Copy link
Member

ShadelessFox commented Dec 13, 2024

It happens sometimes with the DuckDB driver. We'll try reproducing the issue and most likely report it to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants