Kolomgeoriënteerde databases vullen

Introductie tot NoSQL

Jake Roach

Data Engineer

Rij- vs. kolom-georiënteerde databases vullen

Rij-georiënteerd:

  • Geoptimaliseerd voor transacties
  • Beste prestaties bij invoegen, updaten of verwijderen van losse records

Kolom-georiënteerd:

  • Voor analytics-workflows
  • Presteert goed bij bulk loaden, updaten of verwijderen

Analytische database die dagelijks wordt bijgewerkt.

Introductie tot NoSQL

CREATE TABLE

Afbeelding van een Snowflake-datawarehouse en de geneste opslagobjecten.

CREATE TABLE books (
    title VARCHAR(100),
    author VARCHAR(100),
    price FLOAT
);
Introductie tot NoSQL

COPY INTO

COPY INTO books
FROM 'file://data_science_books.csv'
FILE_FORMAT = (
    TYPE = 'CSV'
    FIELD_DELIMITER = ','
    SKIP_HEADER = 1
);

COPY INTO

FROM

  • Locatie in cloudopslag
  • URL
  • Gestagede bestanden

FILE_FORMAT

  • Bestandstype, scheidingsteken, overige metadata
1 https://docs.snowflake.com/en/sql-reference/sql/copy-into-table
Introductie tot NoSQL

CREATE TABLE ... AS

CREATE TABLE premium_books AS
SELECT *
FROM books
WHERE price > 50.00;
CREATE OR REPLACE TABLE premium_books AS
SELECT *
FROM books
WHERE price > 50.00;

CREATE TABLE ... AS

  • Geef een tabelnaam op
  • Maakt een tabel in het huidige schema

SELECT ...

  • Vult de tabel met data uit de query

OR REPLACE

  • Bestaat er al een tabel, dan wordt die vervangen
1 https://docs.snowflake.com/en/sql-reference/sql/create-table
Introductie tot NoSQL

Laten we oefenen!

Introductie tot NoSQL

Preparing Video For Download...