DuckDB Files - Basics #634
-
For context, the devs at work pointed me to duckdb as Excel wasn't cutting the mustard anymore. This is all very very foreign to me. I do not have a computer science background. I'm just some guy swimming in garbage data and an overheating laptop. I had tried Qstudio, which was not appropriate. Harlequin is much cleaner - and easier to use. I'm at a loss as to saving a "persistance database" using Harlequin. With Qstudio, it was quite simple to do so. And it saved a .duckdb file with a nice little duck icon on my C drive. With Harlequin, I can use the EXPORT DATABASE, pointed at a directory, and it generates a series of files there. It functions much the same way, but I'm very much confused as to why there's two different approaches. As this is all so foreign to me, I'm trying to reduce the components I'm interacting with as I ramp up my knowledge over the coming months. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Glad you opened this discussion - I started my journey with Data about 18 years ago in nearly the same way. The short answer is, you can invoke Harlequin with a database filename, and Harlequin will create the persistent database for you. From your shell (terminal or command-line), assuming you are in a directory with your source data files and where you want to save the DuckDB database file: harlequin my_database_name.duckdb -f . Then inside Harlequin, you can execute any DDL queries to create tables in your new database: create table my_first_db_table as (
select * from 'my_csv_file.csv'
) Figured this would be useful for others, also, so I recorded a quick demo video, if that helps! Good luck building some new skills! |
Beta Was this translation helpful? Give feedback.
Glad you opened this discussion - I started my journey with Data about 18 years ago in nearly the same way.
The short answer is, you can invoke Harlequin with a database filename, and Harlequin will create the persistent database for you. From your shell (terminal or command-line), assuming you are in a directory with your source data files and where you want to save the DuckDB database file:
harlequin my_database_name.duckdb -f .
Then inside Harlequin, you can execute any DDL queries to create tables in your new database:
Figured this would be useful for others, also, so I recorded a quick demo video, if that helps!
h…