fixer-m / snowflake-db-net-client

Snowflake .NET Client
Apache License 2.0
51 stars 14 forks source link

Inserting Array into Array #45

Closed jabullen closed 9 months ago

jabullen commented 9 months ago

Does this support inserting an array into an array?

I am getting the below error when passing the array as is.

System.Private.CoreLib: Exception while executing function: TestFunction. Snowflake.Client: Query execution failed. Message: SQL compilation error: error line 27 at position 48 Bind variable :Array not set.

I attempted add ARRAY_CONSTRUCT_COMPACT(:Array) into the values statement with string.Join(", ", entityRow.EsgDetails.EnvironmentThemes!.Select(x => $"'{x}'")) in the parameters which sort of works, but it adds all items in the array as a single item in the snowflake array and doesnt treat each item as a separate item.