Snowpark Migration Accelerator: Ausführen des Tools

Nachdem Sie nun den Snowpark Migration Accelerator (SMA) installiert und Ihre Codebasis vorbereitet haben, können Sie mit der Ausführung beginnen. Kehren Sie zur SMA-Anwendung zurück, wenn sie noch geöffnet ist, oder starten Sie sie, wenn Sie sie geschlossen haben.

Projekteinrichtung

When you first open the SMA, the project page is shown.

![Projektseite](../../../../images/migrations/sma-assets/01-ProjectPage.png „Bild“)

Wählen Sie im Menü die Option „Neues Projekt“, um zu beginnen. Wenn Sie bereits ein Projekt für diese Schritt-für-Schritt-Anleitung erstellt haben, können Sie darauf zugreifen, indem Sie stattdessen „Projekt öffnen“ wählen.

The „Project Creation“ page allows you to create a new project file, which is essential for both assessment and code conversion tasks in SMA. The project file (with a .snowct extension) is stored in your selected output directory and keeps track of all your SMA executions. If you want to link multiple executions together, you can reopen an existing project file. All project information is saved both on your local machine and in the shared database. For more details about projects, see the „project“ file.

All fields shown are required for configuring the assessment tool and managing the project after running the analysis.

![Seite „Projekterstellung“](<../../../../images/migrations/sma-assets/image(537).png> „Bild“)

  1. Project name: This is the name for your project file. Multiple executions can be connected to a single project as well as any settings you save. You can learn more about the project file below.

  2. Email address: This email address identifies the user of the tool. This should be the user of the tool, not the owner of the codebase being scanned.

  3. Company name: This is to help you specify the organization’s code you are working with. If you are running your own code, then put your own organization here. If you are working with another organization, then put that organization name here.

  4. Input folder: Specify the directory where your source codebase is located.

  5. Output folder: The directory where the output files (logs, reports, code) will be placed.

Für diese Anleitung werden wir die Codebasis „Beispiele für Spark Data Engineering“ verwenden. Sie finden sie im Abschnitt „Beispielcodebasen“. Führen Sie die folgenden Schritte aus:

  1. Laden Sie die Codebase herunter und entpacken Sie sie

  2. Suchen Sie das Stammverzeichnis, das alle Dateien enthält - dies wird Ihr Eingabeverzeichnis sein

  3. Wählen Sie einen beliebigen Projektnamen

  4. Wählen Sie ein Ausgabeverzeichnis (das Tool schlägt einen Standardspeicherort vor, aber Sie können ihn nach Bedarf ändern)

Vergewissern Sie sich vor dem Start der Bewertung, dass Ihr Verzeichnis die richtigen Quellcodedateien mit den richtigen Dateierweiterungen enthält, wie im Abschnitt Codevorbereitung erläutert.

When you are ready to begin, click Save to save your project.

After you save, the SMA takes you to the project home page. Select the Code Process tile to start the guided assessment or conversion workflow:

Home Code Process Tile

In the Assessment Settings page, you’ll be prompted to choose whether to Skip Assessment or Start Assessment. Select Start Assessment, then click Continue to begin the assessment run:

Code Process Conversion Settings Start Assessment

Ausführung und Bewertungsausgabe

Wenn Sie den Bewertungsprozess starten, analysiert SMA Ihren Quellcode in drei Schritten:

  1. Zunächst führt es einen grundlegenden Scan durch, um ein Inventar aller Dateien und Schlüsselwörter in Ihrer Codebasis zu erstellen.

  2. Dann parst es den Code entsprechend Ihrer Ausgangssprache und erstellt ein semantisches Modell, das die Funktionalität des Codes darstellt.

  3. Finally, it uses this model to generate detailed information, including the Spark Reference Inventory and Import Library Analysis. It also produces the converted code.

Während dieses Vorgangs sehen Sie drei Fortschrittsanzeigen auf dem Bildschirm:

  • Laden des Quellcodes

  • Analysieren des Quellcodes

  • Schreiben der Ergebnisse

Diese Indikatoren leuchten auf, wenn die einzelnen Schritte abgeschlossen sind.

![Ausführungsseite](../../../../images/migrations/sma-assets/04-ExecutionandAssessmentOutput.png „Bild“)

After the analysis is complete, the SMA automatically shows the Assessment Results page where you can see the analysis output.