分享方式:


使用筆記本探索 Lakehouse 中的數據

在本教學課程中,瞭解如何使用筆記本探索 Lakehouse 中的數據。

必要條件

若要開始使用,您需要下列必要條件:

從 Lakehouse 開啟或建立筆記本

若要探索您的 Lakehouse 數據,您可以將 Lakehouse 新增至現有的筆記本,或從 Lakehouse 建立新的筆記本。

從現有的筆記本開啟 Lakehouse

Screenshot showing where to select Existing notebook.

從筆記本清單中選取筆記本,然後選取 [ 新增]。 筆記本隨即開啟,並將您目前的 Lakehouse 新增至筆記本。

從新的筆記本開啟 Lakehouse

您可以在相同的工作區中建立新的筆記本,而目前的 Lakehouse 會出現在該筆記本中。

Screenshot showing where to select New notebook.

切換 lakehouses 並設定預設值

您可以將多個 Lakehouse 新增至相同的筆記本。 藉由在左面板中切換可用的 Lakehouse,您可以探索不同 Lakehouse 的結構和數據。

Screenshot showing a list of available files in the Lake view.

在 Lakehouse 清單中,Lakehouse 名稱旁的釘選圖示表示它是您目前筆記本中的預設 Lakehouse。 在筆記本程式代碼中,如果只提供相對路徑來存取 Microsoft Fabric OneLake 的數據,則預設 Lakehouse 會在運行時間做為根資料夾。

若要切換至不同的預設 Lakehouse,請移動釘選圖示。

Screenshot of Lake vie Tables and Files folders.

注意

默認 Lakehouse 會決定使用 Spark SQL 執行筆記本時要使用的 Hive 中繼存放區。如果將多個 Lakehouse 新增至筆記本,請確定使用 Spark SQL 時,目標 Lakehouse 和目前的預設 Lakehouse 都來自相同的工作區。

新增或移除 Lakehouse

選取 Lakehouse 名稱旁的 X 圖示會將其從筆記本中移除,但 Lakehouse 專案仍存在於工作區中。

若要從筆記本中移除所有湖屋,請按兩下Lakehouse清單中的 [移除所有Lakehouse]。

Screenshot showing where to remove a lakehouse.

選取 [新增 Lakehouse ] 以將更多 Lakehouse 新增至筆記本。 您可以新增現有的或建立新的。

Screenshot showing where to find the Add lakehouse option.

探索 Lakehouse 數據

Notebook 中顯示的 Lakehouse 結構與 Lakehouse 檢視中的結構相同。 如需詳細數據,請查看 Lakehouse 概觀。 當您選取檔案或資料夾時,內容區域會顯示所選取的詳細資料。

Screenshot showing the location of the content area.

注意

筆記本將會建立在您目前的工作區底下。