Openhack resources
備忘もかねて
Openhack for Lakehouse で参考となる情報をまとめます。
ソースコード
- clone用:https://github.com/microsoft/openhack-for-lakehouse-japanese.git
- dbc用:https://github.com/microsoft/openhack-for-lakehouse-japanese/releases/tag/v1.1.1
- 旧バージョン(3日間版+tip増の大容量版):https://github.com/microsoft/openhack-for-lakehouse-japanese/releases/tag/v1.0.0
共通
Databricks 無償版(コミュニティプラン)
- https://qiita.com/taka_yayoi/items/f00ddb376b27936a5558
- https://www.databricks.com/jp/blog/2021/04/22/get-started-with-databricks-community-edition-jp.html
学習
- databricks 社の教育サイト:https://learn.microsoft.com/ja-jp/training/modules/use-apache-spark-azure-databricks/
- msdocs: https://learn.microsoft.com/ja-jp/training/modules/use-apache-spark-azure-databricks/
- チートシート:https://pages.databricks.com/rs/094-YMS-629/images/Delta-Lake-cheat-sheet.pdf
Community
Day1
git連携
- https://qiita.com/taka_yayoi/items/b89f199ff0d3a4c16140
- https://learn.microsoft.com/ja-jp/azure/databricks/repos/
エディタ:
ファイル入出力、連携
- ms docs:https://learn.microsoft.com/ja-jp/azure/databricks/getting-started/dataframes-python
- https://qiita.com/ktmrmshk/items/54ce2d6f274a67b2e54c
- https://sparkbyexamples.com/spark/spark-read-options/#:~:text=Spark%20provides%20several%20read%20options%20that%20help%20you,DataFrame%20or%20Dataset%20depending%20on%20the%20API%20used.
- スキーマの拡張:https://www.databricks.com/jp/blog/2019/09/24/diving-into-delta-lake-schema-enforcement-evolution.html
- pysparkでのjsonの取り扱い例
- jsonデータのネスト項目の取得
- https://learn.microsoft.com/ja-jp/azure/databricks/sql/language-manual/delta-merge-into
- Power query
- Power query
- データマートの処理方法 CTAS=>全件洗い替え たいていはこれでOK。データ量が多いときにバッチ時間が足りないケースでは別の方法を採用する
- 【トリビアのDelta Lake】#4 Spark DataFrameの変換チートシートを作りました - Qiita
サンプル
- delta lake : https://docs.delta.io/latest/quick-start.html
- delta lake tutorial https://learn.microsoft.com/ja-jp/azure/databricks/delta/tutorial
- datasets https://qiita.com/ryoma-nagata/items/5f34c8f40cbced373ab0
vnet アーキテクチャ
- datalake へのアクセス https://qiita.com/ryoma-nagata/items/66c48dd2a86956c0d00d#vnet-%E3%82%A4%E3%83%B3%E3%82%B8%E3%82%A7%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3
- ウェビナー https://pages.databricks.com/20230419_adb_learning_series_v3_Registration.html?utm_source=msft&utm_medium=partner&utm_campaign=7018y000001ff6mqac
autoLoader COpyinto
- avalible now: https://spark.apache.org/docs/latest/api/python/reference/pyspark.ss/api/pyspark.sql.streaming.DataStreamWriter.trigger.html
- copyinto と autoloader https://qiita.com/ryoma-nagata/items/74e1bd9ebaf0413c9fd6
python api
- python api https://docs.delta.io/latest/api/python/index.html
- delta lake oss https://docs.delta.io/latest/delta-apidoc.html
クラスター、ジョブ、プール
- github best plactice https://github.com/Azure/AzureDatabricksBestPractices/blob/master/toc.md#do-not-store-any-production-data-in-default-dbfs-folders
- mslean https://learn.microsoft.com/ja-jp/azure/databricks/clusters/cluster-config-best-practices
- job https://learn.microsoft.com/ja-jp/azure/databricks/workflows/jobs/jobs#best-practices
- price https://azure.microsoft.com/ja-jp/pricing/details/databricks/
- pool https://learn.microsoft.com/ja-jp/azure/databricks/clusters/pool-best-practices
SQLWH
- 同時実行 https://learn.microsoft.com/ja-jp/azure/databricks/sql/admin/sql-endpoints#queueing-and-autoscaling
- Databricks SQL WHのクラスタ内訳
other
Day2
ML runtime
mlflow
feature store
- sample https://learn.microsoft.com/en-us/azure/databricks/machine-learning/feature-store/example-notebooks
pandas on spark
openhack再現の仕方
前提
- データセットのダウンロード
- datarbricks環境の作成
管理者設定でDBFSファイルブラウザを有効にする
データエクスプローラからDBFSを閲覧
右クリックなどでフォルダを作成し、「/FileStore/db_hackathon4lakehouse_2022/datasource」フォルダにデータセットをすべてアップする