Skip to Content
DuckDB: em funcionamento
book

DuckDB: em funcionamento

by Wei-Meng Lee
March 2025
Intermediate to advanced
308 pages
7h 2m
Portuguese (Portugal, Brazil)
O'Reilly Media, Inc.
Content preview from DuckDB: em funcionamento

Capítulo 6. Usando o DuckDB com arquivos JSON

Este trabalho foi traduzido com recurso a IA. Agradecemos o teu feedback e comentários: translation-feedback@oreilly.com

No Capítulo 2, aprendeste a carregar dados em diferentes formatos - CSV, Parquet, ficheiros Excel e bases de dados MySQL - para o DuckDB. Outro formato de arquivo importante que é popular entre os desenvolvedores é o JSON (JavaScript Object Notation).

Uma das caraterísticas notáveis do JSON é a sua estrutura flexível e dinâmica: não existe um esquema fixo que tenhas de seguir, e podes usar pares chave/valor dinâmicos para representar os teus próprios dados. No DuckDB, existem várias técnicas que podes usar para trabalhar com ficheiros JSON e, por isso, o JSON merece um capítulo dedicado.

Neste capítulo, examinaremos as várias maneiras de carregar arquivos JSON no DuckDB. Veremos alguns ficheiros JSON com diferentes estruturas e forneceremos recomendações sobre qual a função que podes usar para os carregar.

Introdução ao JSON

Esta secção é uma introdução rápida para os que são novos no formato de ficheiro JSON. Se já estás familiarizado com o JSON, podes passar diretamente para a secção seguinte.

JSON é um formato de representação de dados leve que é fácil de ler e interpretar para os humanos e muito eficiente para os computadores manipularem e gerarem. O JSON suporta os seguintes tipos de dados:

  • Objeto

  • Cordas

  • Booleano

  • Número

  • Matriz

  • nulo

As secções seguintes desenvolvem cada um dos tipos de dados.

Objeto

Um objeto ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Projetando Sistemas Distribuídos, 2ª Edição

Projetando Sistemas Distribuídos, 2ª Edição

Brendan Burns
Padrões de arquitetura de aplicativos em Cloud

Padrões de arquitetura de aplicativos em Cloud

Kyle Brown, Bobby Woolf, Joseph Yoder

Publisher Resources

ISBN: 9798341637948