These tasks are executed before the SnowConvert migration. This can be useful to improve the parsing process.
The migration will not generate a new output code if the preprocessing task does not create a new input code due to missing tags or the absence of top-level objects.
This task splits the input code top-level objects into multiple files. The containing folders would be organized following the next hierarchy:
└───A new folder named ''[input_folder_name]_Processed''
└───Top-level object type
Assume that the name of the files is the name of the top-level objects in the input files.
Inside the "schema/database name" folder, should be as many files as top-level objects in the input code. Also, it is possible to have copies of some files when multiple same-type top-level objects have the same name. In this case, the file names will be enumerated in ascending order.
Only files with the ".sql", ".ddl" and ".dml" extensions will be considered for splitting. Other kinds of files like ".bteq" scripts will be copied into the preprocessed folder and will be categorized depending on the script extension but they won't be modified by the Split Task.
In order to identify the top-level objects, they need a tag in a comment before the declaration.
The tag should follow the next format:
You can follow the next example:
/* <sc-table> MY_DATABASE.MY_TABLE</sc-table> */
CREATE TABLE "MY_DATABASE"."MY_TABLE" (