Snowpark Migration Accelerator: 支持的文件类型¶
The Snowpark Migration Accelerator (SMA) scans files in your selected source directory during project creation. While some files are excluded based on their type, SMA generates a summary report showing the count of files by extension.
The SMA tool searches for specific file extensions when analyzing references to the Spark API, SQL Statements, and other elements that contribute to the Readiness Scores. The tool can analyze both code files and notebooks located in any directory or subdirectory of your project.
代码文件¶
Snowpark Migration Accelerator 会扫描以下文件类型,以识别对 Spark API 和其他第三方 APIs 的引用:
扩展名为 .scala 的文件
扩展名为 .py 的文件
扩展名为 .python 的文件
可以在以下文件类型中检测到用 Spark SQL 或 HiveQL 编写的 SQL 语句:
扩展名为 .sql 的 SQL 文件
扩展名为 .hql 的 Hive 查询语言文件
笔记本¶
当 Jupyter Notebook 文件和导出的 Databricks 文件存在于源代码目录中时,Snowpark Migration Accelerator (SMA) 中的 Spark Scala 和 PySpark 解析器会自动扫描和处理这些文件。
Jupyter Notebook files (
*.ipynb)Databricks Notebook files (
*.dbc)
SMA 将分析笔记本文件以识别:
对 Spark API 的引用
对其他第三方 APIs 的引用
SQL 语句
The analysis is performed based on the cell type within each notebook. Notebooks can contain a mix of SQL, Python, and Scala cells. The SMA will create an inventory of all cell types in its output report.
排除的文件和文件夹¶
默认情况下,某些文件和文件夹将被排除在扫描范围之外。这些排除项主要包括项目配置文件及其相关目录。
排除在扫描范围之外的文件夹类型:¶
Python 包安装程序 (pip ) – 用于安装 Python 包的工具
分发包 (dist) – 包含准备分发的 Python 包的目录
虚拟环境 (venv) – 用于管理项目依赖关系的独立 Python 环境
站点包目录 – 安装 Python 包以供整个系统使用的目录
排除在扫描范围之外的文件类型:¶
input.wsp – 工作空间输入文件
.DS_S_Store – 存储自定义文件夹属性的 macOS 系统文件
build.gradle – Gradle 构建配置文件
build.sbt – Scala 构建工具配置文件
pom.xml – Maven 项目对象模型配置文件
storage.lck – 存储锁定文件