SSC-FDM-TS0016
XML columns in Snowflake might have a different format
Description
This warning is added when an SQL Server FOR XML clause is transformed to its Snowflake equivalent. It is added because columns in XML could be different.
Code Example
Given the following table called employee as an example.
Id
Name
Hint
1
Kinslee Park
Developer
2
Ezra Mata
Developer
3
Aliana Quinn
Manager
Input Code:
SELECT
e.id,
e.name as full_name,
e.hint
FROM
employee e
FOR XML PATH;<row>
<id>1</id>
<full_name>Kinslee Park</full_name>
<hint>Developer</hint>
</row>
<row>
<id>2</id>
<full_name>Ezra Mata</full_name>
<hint>Developer</hint>
</row>
<row>
<id>3</id>
<full_name>Aliana Quinn</full_name>
<hint>Manager</hint>
</row>Output Code:
SELECT
--** SSC-FDM-TS0016 - XML COLUMNS IN SNOWFLAKE MIGHT HAVE A DIFFERENT FORMAT **
FOR_XML_UDF(OBJECT_CONSTRUCT('id', e.id, 'full_name', e.name, 'hint', e.hint), 'row')
FROM
employee e;<row type="OBJECT">
<full_name type="VARCHAR">Kinslee Park</full_name>
<hint type="VARCHAR">Developer</hint>
<id type="INTEGER">1</id>
</row>
<row type="OBJECT">
<full_name type="VARCHAR">Ezra Mata</full_name>
<hint type="VARCHAR">Developer</hint>
<id type="INTEGER">2</id>
</row>
<row type="OBJECT">
<full_name type="VARCHAR">Aliana Quinn</full_name>
<hint type="VARCHAR">Manager</hint>
<id type="INTEGER">3</id>
</row>Recommendations
No additional user actions are required; it is just informative.
If you need more support, you can email us at [email protected]
Last updated
