Query’s uitvoeren in het Data Intelligence Platform

Introductie tot Databricks SQL

Kevin Barlow

Data Manager

Motivatie

Lakehouse-diagram - Transformatie

Introductie tot Databricks SQL

Motivatie

Lakehouse-diagram - Analyse

Introductie tot Databricks SQL

SQL-querybasis

  • Gebaseerd op ANSI SQL
  • Patroon- en functiewerking vergelijkbaar met andere SQL-dialecten
    • SELECT ... FROM ...-syntaxis
    • Ingebouwde en aangepaste functies
    • Query tabellen in Unity Catalog of andere databases
SELECT
    id,
    name,
    product,
    store_id,
    sales,
    unit_price,
FROM
    sales_data
WHERE
    sales > 10 AND
    product IN ('widget', 'thingy')
Introductie tot Databricks SQL

Veelgebruikte functies

  • Databricks SQL-functies spiegelen veelgebruikte bewerkingen in SQL, Python en Spark
    • ROUND() en FORMAT_NUMBER()
    • CONCAT(), LEFT() en RIGHT()
    • DATE(), DATE_ADD() en DATE_DIFF()
    • CASE, IF() en ISNULL()
    • FROM_CSV() en FROM_JSON()
  • Maak een eigen User Defined Function (UDF)
SELECT
    id,
    initcap(name) as name,
    right(product, 10) as productSKU,
    store_id,
    int(sales) as numSales,
    round(unit_price, 2) as unit_price
FROM
    sales_data
WHERE
    sales > 10 AND
    product IN ('widget', 'thingy')
Introductie tot Databricks SQL

Visualisaties

  • Visuele weergaven van queryresultaten
  • Ondersteuning voor de meest gebruikte visualisaties
    • Staaf- en lijndiagrammen
    • Donutdiagrammen
    • Kaartvisualisaties
    • Pivot-tabellen

Gestapeld staafdiagram

Lijndiagram

Introductie tot Databricks SQL

Laten we oefenen!

Introductie tot Databricks SQL

Preparing Video For Download...