tree: 59d14e42e5762eddf6628b258bbde1696bdcf4b0 [path history] [tgz]
  1. Resources/
  2. Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
  3. CastTests.cs
  4. ClientTests.cs
  5. ConstraintTests.cs
  6. DriverTests.cs
  7. ErrorHandlingTests.cs
  8. NumericOperatorTests.cs
  9. readme.md
  10. SnowflakeData.cs
  11. SnowflakeTestConfiguration.cs
  12. SnowflakeTestingUtils.cs
  13. ValueTests.cs
csharp/test/Drivers/Interop/Snowflake/readme.md

Snowflake

The Snowflake tests leverage the interop nature of the C# ADBC library. These require the use of the Snowflake Go driver. You will need to compile the Go driver for your platform and place the driver in the correct path in order for the tests to execute correctly.

To compile, navigate to the go/adbc/pkg directory of the cloned arrow-adbc repository then run the make command. If you encounter compilation errors, please ensure that Go, GCC and C++ tools are installed. And following Contributing to ADBC.

Setup

The environment variable SNOWFLAKE_TEST_CONFIG_FILE must be set to a configuration JSON file for the tests to execute. If it is not, the tests will show as passed with an output message that they are skipped. A template configuration file can be found in the Resources directory.

Configuration

The following values can be setup in the configuration:

  • driverPath - The path for the Go library. Can be a relative path if using .NET 5.0 or greater, otherwise, it is an absolute path.
  • driverEntryPoint - The driver entry point. For Snowflake, this is SnowflakeDriverInit.
  • account - The adbc.snowflake.sql.account value from the Snowflake Client Options.
  • user - The Snowflake user name.
  • password - The Snowflake password, if using auth_snowflake for the auth type.
  • warehouse - The adbc.snowflake.sql.warehouse value from the Snowflake Client Options.
  • authenticationType - The adbc.snowflake.sql.auth_type value from the Snowflake Client Options.
  • authenticationTokenPath - The path to the authentication token file, if using auth_jwt for the auth type.
  • metadata
    • catalog - Used by metadata tests for which database to target.
    • schema - Used by metadata tests for which schema to target.
    • table - Used by metadata tests for which table to target.
    • expectedColumnCount - Used by metadata tests to validate the number of columns that are returned.
  • query - The query to use.
  • expectedResults - The expected number of results from the query.

Data

This project contains a SQL script to generate Snowflake data in the resources/SnowflakeData.sql file. This can be used to populate a table in your Snowflake instance with data.

The tests included assume this script has been run.