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
To connect to Snowflake, you will need to install the Snowflake Python connector.
To install using Conda
, run the following:
conda install -c conda-forge snowflake-sqlalchemy snowflake-connector-python
To install using pip
, run the following:
pip install "snowflake-connector-python[pandas]" pip install --upgrade snowflake-sqlalchemy...