Snowpark Migration Accelerator: ウォークスルーのセットアップ¶
このガイドでは、Snowpark Migration Accelerator(SMA)の実践的な使用方法について説明します。実際の例を通して、コードの評価方法や評価結果の解釈方法を学び、ツールの機能を明確に理解することができます。
マテリアル¶
このチュートリアルを完了するには、以下が必要です。
Snowpark Migration Accelerator(SMA)ソフトウェアがインストールされているコンピューター
同じコンピューター上のサンプルコードファイルへのアクセス
始めるには、ご使用のコンピューターに2つのアイテムが必要です。
Snowpark Migration Accelerator(SMA)ツール
コードサンプル
これらの重要なリソースを入手する方法を説明しましょう。
SMA アプリケーション¶
Snowpark Migration Accelerator(SMA)は、開発者が PySpark やSpark ScalaアプリケーションをSnowflake上で実行できるように変換することを支援します。PythonやScalaコード内のSpark API 呼び出しを自動的に検出し、同等のSnowpark API 呼び出しに変換します。このガイドでは、Sparkのサンプルコードを分析して、 SMA の基本的な関数を示し、移行プロジェクトをどのように支援するかを紹介します。
最初の評価フェーズでは、Snowpark Migration Accelerator(SMA)がソースコードを調査し、コード内のすべての関数をキャプチャする詳細なモデルを構築します。この分析に基づいて、 SMA は、このウォークスルーで確認する詳細な評価レポートを含む、いくつかのレポートを作成します。これらのレポートにより、Snowparkへの移行に必要なコードの準備状況を把握し、移行に必要な労力を見積もることができます。このラボを続ける中で、これらの発見をさらに詳しく見ていくことにしましょう。
ダウンロードとインストール¶
To begin an assessment with the Snowpark Migration Accelerator (SMA), you only need to complete the installation process. While Snowflake provides optional helpful training on using the SMA, you can proceed without it. No special access codes are needed. Simply:
Visit our Download and Access section
Follow our Installation instructions to set up the application on your computer
サンプルコードベース¶
このガイドでは、Pythonのコード例を使用して移行プロセスを示します。サードパーティのGitリポジトリから2つのサンプルコードベースを選びました。これらのコードベースには、以下からアクセスできます。
PySpark Data Engineering Examples: https://github.com/spark-examples/pyspark-examples
Apache Spark Machine Learning Examples: https://github.com/apache/spark/tree/master/examples/src/main/python
Snowpark Migration Accelerator(SMA)を使用してコードベースを分析するには、以下のステップに従います。
Download the codebases as zip files from GitHub. You can find instructions on how to do this in the GitHub documentation.
コンピューターに、別々のフォルダーをコードベースごとに作成します。
以下の画像のように、各zipファイルを指定のフォルダーに解凍します。
These sample codebases demonstrate how SMA evaluates Spark API references to calculate the Spark API Readiness Score. Let's look at two scenarios:
Snowparkとの互換性が高く、移行準備が整っていることを示す高スコアを獲得したコードベース。
低スコアを受けたコードベースは、移行前に追加レビューと潜在的な修正が必要であることを示します。
レディネススコアは貴重な洞察を提供しますが、移行を計画する際に考慮する必要のある唯一の要因として扱うべきではありません。移行を成功させるためには、高スコア評価でも低スコア評価でも、あらゆる側面の包括的な評価が必要です。
After unzipping the directories, SMA will analyze only files that use supported code formats and notebook formats. These files are checked for references to Spark API and other Third Party APIs. To see which file types are supported, please check the list here.
このウォークスルーの残りの部分を通して、これら2つのコードベースがどのように実行されるかを分析します。
サポート¶
For help with installation or to get access to the code, please email sma-support@snowflake.com.
コードベースをダウンロードし、別々のディレクトリに解凍した後、次のいずれかを実行できます。
Move on to running the tool
Review the code preparation notes