Company
Date Published
Author
Stephen Allwright
Word count
1686
Language
English
Hacker News points
None

Summary

The Snowflake SQL API allows developers to access and execute SQL queries in their instance, making it easier to integrate Snowflake into applications. The API is structured around the `/api/v2/statements/` endpoint, which can be used to submit a SQL statement for execution, check its status, or cancel it. Authentication is required using JSON Web Token (JWT) or OAuth. Developers can customize their requests by adding variables to the SQL command and specifying bindings. The API returns a ResultSet object containing metadata about the returned data, as well as the first partition of data. Additional GET requests can be used to fetch extra partitions of data. Integrating this API into an application is relatively simple but requires ongoing maintenance, which can become time-consuming. An alternative solution is Census, a reverse ETL tool that allows developers to move data from Snowflake into all their tools without setting up and maintaining these integrations.