Writing time series data to Snowflake
Snowflake has become a very popular cloud database option for building big data analytics, due to its scalability, performance, and being SQL-oriented (a columnar-stored relational database).
Snowflake's connector for Python simplifies the interaction with the database whether it's for reading or writing data, or, more specifically, the built-in support for pandas
DataFrames. In this recipe, you will use the sensor IoT dataset prepared in the Writing time series data to InfluxDB recipe. The technique applies to any pandas
DataFrame that you plan to write to Snowflake.
Getting ready
You should refer to the recipe Reading data from a Snowflake in Chapter 3, Reading Time Series Data from Databases as a refresher on the different ways to connect to Snowflake.
The recommended approach for the snowflake-connector-python
library is to install it using pip allowing you to install extras such as pandas
as shown:
pip install snowflake-sqlalchemy...