Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Getting Started with DuckDB
  • Table Of Contents Toc
Getting Started with DuckDB

Getting Started with DuckDB

By : Simon Aubury, Ned Letcher
5 (1)
close
close
Getting Started with DuckDB

Getting Started with DuckDB

5 (1)
By: Simon Aubury, Ned Letcher

Overview of this book

DuckDB is a fast in-process analytical database. Getting Started with DuckDB offers a practical overview of its usage. You'll learn to load, transform, and query various data formats, including CSV, JSON, and Parquet. The book covers DuckDB's optimizations, SQL enhancements, and extensions for specialized applications. Working with examples in SQL, Python, and R, you'll explore analyzing public datasets and discover tools enhancing DuckDB workflows. This guide suits both experienced and new data practitioners, quickly equipping you to apply DuckDB's capabilities in analytical projects. You'll gain proficiency in using DuckDB for diverse tasks, enabling effective integration into your data workflows.
Table of Contents (15 chapters)
close
close

Using INSERT effectively

For this section, we will create an index on our skiers table to ensure each skier’s name is unique:

CREATE UNIQUE INDEX skier_unique
ON skiers (skier_first_name);

With this index created, we can be assured that skier_first_name is a unique value.

Imagine that we have a new skier called Kim who has a blue helmet. We can use the conventional INSERT syntax to list the columns and values:

INSERT INTO skiers(skier_first_name, skier_helmet_color)
SELECT 'Kim' AS skier_first_name, 'blue' AS skier_helmet_color;

This isn’t very difficult, but we do need to ensure we keep the positional order of the column names (skier_first_name, skier_helmet_color) so that they match the order of the data provided ('Kim', 'blue'). This can become tedious if we are dealing with very wide tables with numerous columns and need to keep the ordering consistent.

DuckDB allows us to use the BY NAME directive to signify...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Getting Started with DuckDB
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon