- The data is in S3, so we can use the
s3table function to create a table from the files. We can also query the data in place. Let’s look at a few rows before attempting to insert it into ClickHouse:
- We will use the following
MergeTreetable to store the data in ClickHouse:
- ClickHouse Cloud services have a cluster named
default. We will use thes3Clustertable function, which reads S3 files in parallel from the nodes in your cluster. (If you don’t have a cluster, just use thes3function and remove the cluster name.)
- Let’s see how much storage disk is needed for the
sensorstable:
- Let’s analyze the data now that it’s in ClickHouse. Notice the quantity of data increases over time as more sensors are deployed:
- This query counts the number of overly hot and humid days: