Linking CIMIS as a source
This source is currently in alpha. The interface and available tables may change.
The CIMIS connector pulls California weather and reference evapotranspiration (ETo) data from the California Irrigation Management Information System (CIMIS) into the PostHog Data warehouse, so you can analyze weather data alongside your product data.
Prerequisites
CIMIS is a free service. You need a CIMIS account so you can create a web-services appKey.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
When linking CIMIS, you'll need:
- App key – register for a free account and create a web-services appKey in your CIMIS account.
- Targets (station numbers) – optional. To sync the daily and hourly weather tables, set this to a comma-separated list of CIMIS station numbers (e.g.
2,8,127). You can look up station numbers in thestationstable or on the CIMIS station map. The station and zip-code metadata tables sync without targets. - Unit of measure – optional. Choose English (°F, inches) or Metric (°C, mm). Defaults to English.
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
Configuration
| Option | Type | Required |
|---|---|---|
App key | password | Yes |
Targets (station numbers) | text | No |
Unit of measure | select | No |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
stations | Metadata for every CIMIS weather station, including location, elevation, and active status. | Full refresh | — | — |
station_zipcodes | Mapping of zip codes to the CIMIS Weather Station Network station that serves them. | Full refresh | — | — |
spatial_zipcodes | Zip codes supported by the Spatial CIMIS System (2km gridded interpolated data). | Full refresh | — | — |
daily_data | Daily weather and reference evapotranspiration (ETo) observations per station. | Incremental, Full refresh | Date | — |
hourly_data | Hourly weather and reference evapotranspiration (ETo) observations per station. | Incremental, Full refresh | Date | — |
Troubleshooting
- If you get an authorization error, your CIMIS appKey is invalid or has expired. Create a new appKey in your CIMIS account, then reconnect.
- If your appKey is rejected, it may not have been activated yet. Check the key in your CIMIS account, then reconnect.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.