SnowConvert AI - Best practices¶
1.提取¶
我们强烈建议您使用我们的脚本来提取工作负载:
Teradata:点击此处 (https://github.com/Snowflake-Labs/SC.DDLExportScripts/blob/main/Teradata/README.md)。
Oracle:点击此处 (https://github.com/Snowflake-Labs/SC.DDLExportScripts/blob/main/Oracle/README.md)。
SQLServer:点击此处 (https://github.com/Snowflake-Labs/SC.DDLExportScripts/blob/main/SQLServer/README.pdf)。
Redshift:点击此处。
2.预处理¶
我们强烈建议您使用预处理脚本,该脚本旨在在开始评估或转化之前为您提供更好的结果。此脚本执行以下任务:
为每个顶级对象创建单个文件
按定义的文件夹层次结构组织每个文件(默认为:数据库名称 -> 架构名称 -> 对象类型)
生成一份清单报告,提供有关工作负载中所有对象的信息。
2.1 下载¶
Please click here (https://sctoolsartifacts.z5.web.core.windows.net/tools/extractorscope/standardize_sql_files) to download the binary of the script for MacOs (make sure to follow the setup on 2.3).
Please click here (https://sctoolsartifacts.z5.web.core.windows.net/tools/extractorscope/standardize_sql_files.exe) to download the binary of the script for Windows.
2.2 描述¶
运行脚本需要以下信息:
脚本实参 |
示例值 |
必填 |
使用量 |
|---|---|---|---|
输入文件夹 |
|
是 |
|
输出文件夹 |
|
是 |
|
数据库名称 |
|
是 |
|
数据库引擎 |
|
是 |
|
输出文件夹结构 |
|
否 |
|
生成数据透视表 |
|
否 |
|
备注
数据库引擎实参 (-e) 的支持值为:oracle、mssql 和 teradata
备注
The supported values for the output folder structure argument (-s) are: database_name, schema_name and top_level_object_name_type.
When specifying this argument all the previous values need to be separated by a comma (e.g., -s database_name,top_level_object_name_type,schema_name).
此参数是可选的,如果未指定,则默认结构如下:数据库名称、顶级对象类型和架构名称。
备注
数据透视表生成参数 (-p) 是可选的。
2.3 为 Mac 设置二进制¶
将二进制设置为可执行:\
chmod +x standardize_sql_files通过执行以下命令来运行脚本:
./standardize_sql_files如果是第一次运行二进制,则会弹出以下消息:\
点击 OK。打开“Settings”->“Privacy & Security”-> 点击“Allow Anyway”\

运行脚本¶
使用以下格式运行脚本:
Mac format
./standardize_sql_files -i "input path" -o "output path" -d Workload1 -e teradataWindows format
./standardize_sql_files.exe -i "input path" -o "output path" -d Workload1 -e teradata
如果成功执行脚本,将显示以下输出:
拆分过程已成功完成!\报告已成功创建!\脚本已成功执行!