Ambiguous Comments Validation

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

This validation step verifies if the entry code has a sequence of characters that may create ambiguous comments (/*/)

If the entry code has an ambiguous comment, a window with a warning is displayed like the next one:

Ambiguous Comment Validation Failed

Also, in the ScopeValidation report, you will find information about the failed file (s).

ScopeValidation.csv

Why is it ambiguous?

Block comments on SQL starts with /* and ends with */ . When the character sequence /*/ is used, depending on the source language, it can start a nesting inside the block comment, or finish the whole block.

Here is an example of valid statements using /*/

select col1,
  /*Some comment/*/ */*/
  col2,
  col3
from
  table1;

As you can see, the comment behaves differently in Teradata and SQL Server than in Oracle and Snowflake. Even on Teradata, there is another treatment for bteq and other scripting languages.

Solving the ambiguity.

In Snowflake, if you encounter the /*/ sequence in your code, it typically ends a block comment. However, if you're using it differently in your source code, make sure to adjust it accordingly.

Last updated