### Install Snowflake Node.js Driver Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/samples/README.md Installs the necessary dependencies for the Snowflake Node.js driver samples by running the npm install command in the samples directory. ```shell cd samples npm i ``` -------------------------------- ### Install Snowflake SDK Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Installs the Snowflake SDK package into your Node.js project using npm. ```shell npm i snowflake-sdk ``` -------------------------------- ### Get Code Coverage Report Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Runs tests and generates a code coverage report for the Snowflake Node.js driver. ```shell npm run test:ci:coverage ``` -------------------------------- ### Prepare for Manual Tests: Environment Variables Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Sets environment variables for manual testing, including Okta credentials and OAuth tokens for various authentication methods. ```shell export RUN_MANUAL_TESTS_ONLY=true export SNOWFLAKE_TEST_OKTA_USER= export SNOWFLAKE_TEST_OKTA_PASS= export SNOWFLAKE_TEST_OKTA_AUTH= export SNOWFLAKE_TEST_OAUTH_TOKEN= export SNOWFLAKE_TEST_BROWSER_USER= ``` -------------------------------- ### Configure Test Environment Variables Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/samples/README.md Sets essential environment variables required for running tests with the Snowflake Node.js driver. These variables include user credentials, account details, and connection parameters. ```shell export SNOWFLAKE_TEST_USER= export SNOWFLAKE_TEST_PASSWORD= export SNOWFLAKE_TEST_ACCOUNT= export SNOWFLAKE_TEST_WAREHOUSE= export SNOWFLAKE_TEST_DATABASE= export SNOWFLAKE_TEST_SCHEMA= export SNOWFLAKE_TEST_PROTOCOL= export SNOWFLAKE_TEST_HOST= export SNOWFLAKE_TEST_PORT= ``` -------------------------------- ### Prepare for Tests: Environment Variables Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Sets essential environment variables required for running Snowflake driver tests. These variables configure connection details and credentials. ```shell export SNOWFLAKE_TEST_USER= export SNOWFLAKE_TEST_PASSWORD= export SNOWFLAKE_TEST_ACCOUNT= export SNOWFLAKE_TEST_WAREHOUSE= export SNOWFLAKE_TEST_DATABASE= export SNOWFLAKE_TEST_SCHEMA= export SNOWFLAKE_TEST_PROTOCOL= export SNOWFLAKE_TEST_HOST= export SNOWFLAKE_TEST_PORT= ``` -------------------------------- ### Build Squid Docker Image Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/ci/image/proxy/README.rst Builds the Docker image for the Squid proxy server using the provided Dockerfile. This command creates a new image tagged as 'squid'. ```bash docker build --rm -t squid . ``` -------------------------------- ### Run Query Reading vs. Streaming Test Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/samples/README.md Initiates a test to compare the performance characteristics between reading all rows from a query at once versus streaming the rows. Users should first configure their specific query in the './rowsVsStreamingQuery.js' file. ```shell npm run rowsVsStreamingQuery ``` -------------------------------- ### Run Unit Tests Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Executes the unit tests for the Snowflake Node.js driver using npm. ```shell npm test ``` ```shell npm run test:unit ``` -------------------------------- ### Run Manual Connection Tests Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Executes manual tests to verify connection functionality with different authenticators. ```shell npm run test:manual ``` -------------------------------- ### Run Integration Tests Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Executes the integration tests for the Snowflake Node.js driver using npm. ```shell npm run test:integration ``` -------------------------------- ### Build npm Package Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Creates an npm package file for the Snowflake Node.js driver. ```shell npm pack ``` -------------------------------- ### Test Squid Proxy Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/ci/image/proxy/README.rst Tests the Squid proxy server by making an HTTP request to a website through the proxy. The '-x' flag specifies the proxy address. ```bash curl -x http://localhost:8765 https://www.snowflake.net/ ``` -------------------------------- ### Run Single Test File Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Executes a specific test file for the Snowflake Node.js driver using the `test:single` npm script. ```shell npm run test:single -- test/unit/snowflake_test.js ``` -------------------------------- ### Check Code Formatting Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Checks the code formatting of all files or specific files/directories within the project. ```shell npm run lint:check:all ``` ```shell npm run lint:check -- test/unit/snowflake_test.js ``` -------------------------------- ### Run JSON Parser Comparison Test Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/samples/README.md Executes a test that compares the performance of different methods for retrieving variant data, specifically focusing on JSON parsing. The test can be configured with the number of rows and the specific parser to evaluate. ```shell npm run jsonParserComparison # Example with parameters: npm run jsonParserComparison 300000 300000 Function npm run jsonParserComparison 300000 300000 JSON ``` -------------------------------- ### Verify Package Signature Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Verifies the authenticity and integrity of the driver package using `cosign`. ```shell cosign verify-blob snowflake-sdk-1.13.0.tgz --key snowflake-connector-nodejs-v1.13.0.pub --signature resources.snowflake-sdk-1.13.0.tgz.sig ``` -------------------------------- ### Run Squid Docker Container Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/ci/image/proxy/README.rst Runs the Squid proxy server in a Docker container. It names the container 'proxy', runs it in detached mode (-d), and maps host port 8765 to the container's port 3128. ```bash docker run --name proxy -d -p 8765:3128 squid ``` -------------------------------- ### Fix Code Formatting Source: https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/README.md Attempts to automatically fix formatting errors and warnings in specified files or directories. ```shell npm run lint:fix -- test/unit/logger ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.