Issue Code Categorization

What kind of issue codes does the SMA generate?

The Snowpark Migration Accelerator (SMA) generates issue codes based on what it finds in a given codebase. These issue code are very descriptive, but ultimately can be grouped together in one of the following three categories.

Parsing Error

A parsing error is an error that comes from a failure of the tool to parse some part of the source code. In other words, the SMA came across some code that it does not recognize or does not think is valid. This is generally an error in the SMA or in the source code itself, and it could be caused by a variety of reasons. Some of the most common would include:

  • Code that is not valid in the source. The code put through the tool should run in the source platform. All of it. Meaning if a snippet of code or couple of lines that would not run on their own in the source platform are put through the tool, they will not be parsed by the SMA.

  • Code that contains a circular reference. As the SMA resolves dependencies, in large codebases there can be circular references. This can sometimes cause the tool to "skip" (or fail to parse) one or more of those references.

  • A new code pattern. Source platforms are being updated all the time, and while the SMA is also being updated all the time, there could be a gap.

  • Additional or unrecognized characters in the source code. Sometimes if the code is not uniformly encoded or there is an extra character at the beginning or the end of a file, the rest of the file may run in the source, but the SMA will produce a parsing error.

Parsing errors have specific error codes associated with them. Check the issue codes by source section in this documentation to see what codes may be related to a parsing error.

Conversion Error

A conversion error occurs when the SMA encounters code that it recognizes, but it cannot convert. Note that while a parsing error may be caused by an error in the input code, a conversion error is not. A conversion error is the tool performing correctly by identifying code that cannot be converted.

As with parsing errors and warnings, there are also a variety of reasons why a piece of code may not be able to be converted. A few of the more common reasons include:

  • The element from the source code is not supported in Snowflake. This means that there is (currently) no way to replicate the functionality from the source in the target.

  • The way a given element is used is not supported in Snowflake. It's possible that an element from a source platform is supported in Snowflake, but not the way that it is being used in the source.

  • Some essential parameters are not supported. The SMA completely parses the source code and builds a functional model of every element in the source code. As a result, it does more that just recognize an element and classify it. It understands how it is being used. as a result, there can be parameters from a function in the source code that are necessary, but are not supported in Snowflake.

  • A combination of functions is not supported. As with the previous bullet, the SMA's functional model will know how multiple functions interact with each other. It is possible for a set of functions that are all supported individually to not work together. The SMA will report this situation as a conversion error.

Most conversion errors should come with recommendations or suggested next steps that are included on the page for that specific error.

When the SMA generates a conversion error, it will always insert an EWI comment in the output code and log the error in the issues inventory file. Depending on the specific error it will either:

  • Comment out the line with the conversion error.

  • Leave the code uncommented to ensure that the file cannot be run.

Conversion errors have specific error codes associated with them. Check the issue codes by source section in this documentation to see what codes may be related to a conversion error.

Warning

A warning is not an error. A warning is output by the SMA when there is something the tool wants you to be aware of that has changed. Like the previous error messages on this page, this could occur for a variety of reasons, but it's important to note that warnings will not affect the output code's ability to run in the source. They are just message telling you that something may be (or look) a bit different.

Some of the reasons why a warning may be generated include:

  • The code looks different. The SMA does perform some transformations where it will generate an EWI.

  • There are corner cases where the conversion may not work. If 99.9% of tested use cases for a given element work, but there is a combination of parameters that could not work, the tool will output a warning. If the combination of parameters are actually being used in the source code, the tool will generated a conversion error.

  • Something was removed. This is probably the most common type of warning. There are many functions or parameters in a function that are necessary for the functionality of the source, but are not necessary in Snowflake.

Warnings usually do not require any action from the user. It is informational. However, it is strongly recommended that all warnings be reviewed before deploying to the target, and they should be accounted for when doing testing on the output code.

Warnings have specific error codes associated with them. Check the issue codes by source section in this documentation to see what codes may be related to a warning.

Last updated

#332: [SIT-1562] SQL Readiness

Change request updated