'''
IDbCommand cmd = conn.CreateCommand();
var query = ($"Insert into table1 (c1, c2, c3, c4, " +
$"c5, c6, c7, c8, c9, c10, c11, c12, c13," +
$"c14, c15, c16, c17, c18, c19, " +
$"c20, c21, c22, c23, c24, c25, c26)" +
$" values " +
$"(:p_1, :p_2, :p_3, :p_4, :p_5, :p_6, :p_7, :p_8, :p_9, " +
$":p_10, :p_11, p_12,:p_13,:p_14, :p_15, :p_16, :p_17, :p_18, :p_19, :p_20, :p_21, :p_22,
" +$":p_23, :p_24, :p_25, :p_26)");
// Here p_1, ...... p_26 are parameter names created for parameters p1, ....... p26 each of
// which holds a string array.
cmd.CommandText = query;
cmd.Parameters.Add(p1);
.
.
cmd.Parameters.Add(p26);
cmd.ExecuteNonQuery();
'''
This is the standard way of insertion using bind array variables as illustrated in Github documentation of Snowflake .Net connector https://github.com/snowflakedb/snowflake-connector-net
If the parameter p23 stores an array that has a string elements like "India, Australia", the insert query inserts India in c23 and Australia in c24 and all the other column values also get pushed further.
But if the same parameter p23 or any other parameter has an array that stores a string element like "China, Japan" or "12355,,", then this string gets inserted perfectly fine into the correct column.
It seems like the ExecuteNonQuery() function is splitting these strings, but I've not found any patterns in the strings that get split and the strings that do not.