A simple .NET console application that showcases how the Snowflake.Data package can be used to execute SQL queries against a Snowflake database and output the results in a tab-separated format.
- Runtime: .NET 8.0 SDK or later.
- Packages:
Snowflake.Data(v5.4.0) - The official Snowflake .NET driver. For more information, visit the official GitHub repository.
To build the project, navigate to the snowflake directory and use the .NET CLI:
Download the required NuGet packages:
dotnet restoreCompile the application:
dotnet buildThe compiled binaries will be located in bin/Debug/net8.0/.
Run the compiled executable with a connection string and the SQL query as arguments:
dotnet run -- "<connection_string>" "<query>"dotnet run -- "account=myaccount;user=myuser;password=mypass;db=HIST_DATA_PROD;schema=<V8_US|V8_EU>" "SELECT okey_tk,okey_dt,okey_xx,okey_cp,srprc FROM OPTIONINTADAYHIST_EQT WHERE date_p='2026-02-05' AND okey_tk='AAPL'"The output will be tab-separated, with the first row containing column names.
