Select to view content in your preferred language

ArcGIS text fields and Snowflake varchar fields aren't playing nice

231
3
07-29-2024 11:50 AM
StephenRhone
Occasional Contributor

I am composing a Python script that will truncate an existing Snowflake table then reload it with newly updated GIS data.  When I try to use Append using the "NO TEST" qualifier, the tool executes successfully, but when I go to review the results in Snowflake, only the non-text fields contain data from the source table, even though the schemas line up perfectly.

It turns out that, while the GIS copy of the table has two TEXT fields, the corresponding Snowflake table has two VARCHAR fields, both of which have identical field lengths across the two tables.  Has anyone else run into this issue?  If so, hopefully you have a workaround you can share.  Thanks in advance!

Tags (3)
0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

did you explore the field mapping option in Append?

Append (Data Management)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
StephenRhone
Occasional Contributor

Hi Dan, thanks for reaching out.

I tried the same procedure in ArcGIS Pro using the Append tool's dialog box and confirmed that all the fields lined up - when I ran it, I got a completion with warnings message, and for each row in my input, I got an error 1156 message that said the text values couldn't be written to the output table.

I tried looking into different data types, but there is only one in ArcGIS that corresponds to strings, that being TEXT, and Snowflake only appears to have VARCHAR as a string type.  In fact, when I tried changing the fields in the Snowflake table to other valid text types (TEXT, STRING, CHAR), it had no effect; the fields remained VARCHAR.

0 Kudos
TonyAlmeida
Frequent Contributor

Try doing the append in Pro and see if there are fields that might display the aliases instead of the actual name.

0 Kudos