Bagikan melalui


Tutorial: Menganalisis data dalam buku catatan

Applies to:✅ SQL analytics endpoint and Warehouse in Microsoft Fabric

Dalam tutorial ini, pelajari cara menganalisis data dengan notebook di Gudang.

Nota

This tutorial forms part of an end-to-end scenario. Untuk menyelesaikan tutorial ini, Anda harus terlebih dahulu menyelesaikan tutorial ini:

  1. Membuat ruang kerja
  2. Membuat Gudang
  3. Memasukkan data ke dalam Gudang

Membuat buku catatan T-SQL

Dalam tugas ini, pelajari cara membuat buku catatan T-SQL.

  1. Pastikan ruang kerja yang Anda buat di tutorial pertama terbuka.

  2. On the Home ribbon, open the New SQL query dropdown, and then select New SQL query in notebook.

    Screenshot of the New SQL query in notebook option on the ribbon.

  3. Di panel Explorer, pilih Gudang untuk menampilkan objek dari gudang Wide World Importers.

  4. Untuk menghasilkan templat SQL untuk menjelajahi data, di sebelah kanan tabel dimension_city, pilih elipsis (...), lalu pilih SELECT TOP 100.

    Cuplikan layar panel Explorer, menyoroti pilihan opsi SELECT TOP 100.

  5. To run the T-SQL code in this cell, select the Run cell button for the code cell.

    Screenshot of the notebook, highlighting the Run cell button for the code cell.

  6. Tinjau hasil kueri di panel hasil.

Create a lakehouse shortcut and analyze data with a notebook

In this task, learn how to create a lakehouse shortcut and analyze data with a notebook.

  1. Buka halaman depan ruang kerja Data Warehouse Tutorial.

  2. Pilih + Item Baru untuk menampilkan daftar lengkap jenis item yang tersedia.

  3. From the list, in the Store data section, select the Lakehouse item type.

  4. In the New lakehouse window, enter the name Shortcut_Exercise.

    Cuplikan layar jendela New lakehouse, menyoroti nama yang dimasukkan.

  5. Select Create.

  6. When the new lakehouse opens, in the landing page, select the New shortcut option.

    Screenshot of lakehouse landing page, highlighting the New shortcut button.

  7. Di jendela jalan pintas baru, pilih opsi Microsoft OneLake.

    Screenshot of the New shortcut window, highlighting the Microsoft OneLake internal source.

  8. Di jendela Pilih jenis sumber data, pilih gudang Wide World Importers yang Anda buat di tutorial Buat gudang, lalu pilih Berikutnya.

  9. Di browser objek OneLake, perluas Tabel, perluas skema dbo, lalu pilih kotak centang untuk tabel dimension_customer.

    Screenshot of the New shortcut window, highlighting the selection of the dimension customer table.

  10. Select Next.

  11. Select Create.

  12. Di panel Explorer, pilih tabel untuk mempratinjau data, lalu tinjau data yang diambil dari tabel di gudang.

  13. To create a notebook to query the dimension_customer table, on the Home ribbon, in the Open notebook dropdown, select New notebook.

    Cuplikan layar opsi Buku catatan baru pada pita.

  14. In the Explorer pane, select Lakehouses.

  15. Seret tabel dimension_customer ke sel buku catatan yang terbuka.

    Screenshot of the Explorer pane, highlighting the dimension customer table drag to the notebook cell.

  16. Perhatikan kueri PySpark yang ditambahkan ke sel buku catatan. This query retrieves the first 1,000 rows from the Shortcut_Exercise.dimension_customer shortcut. This notebook experience is similar to Visual Studio Code Jupyter notebook experience. You can also open the notebook in VS Code.

    Cuplikan layar kueri buku catatan, memperlihatkan kueri PySpark yang dihasilkan secara otomatis.

  17. On the Home ribbon, select the Run all button.

    Cuplikan layar pita Beranda, menyoroti tombol Jalankan semua.

  18. Tinjau hasil kueri di panel hasil.

Next step