This file provides an example of how to use the Xray library to interact with a snowflake database in a Go application. The example demonstrates how to connect to the database, execute queries, retrieve table schemas, and generate SQL CREATE TABLE statements.
Running a Snowflake Database with Xray
To get your Snowflake database up and running with the Xray library, follow these steps:
Create a Snowflake Account: If you haven't already, create a Snowflake account to get started.
Configure Snowflake Settings: Open your main.go file and configure your Snowflake settings as described in detail in the Integration.md file.
Set Snowflake Password: In your terminal, set your Snowflake password as an environment variable. Replace <DB_PASSWORD> with your actual Snowflake password:
export DB_PASSWORD=<DB_PASSWORD>
Update Dependencies: Ensure your Go project's dependencies are up to date by running the following command in your terminal:
go mod tidy
Run Your Application: Finally, execute your main.go file with the following command: