Visual Crossing
Visual Crossing provides historical weather observations and weather forecasts for any point on Earth. With Weld you can sync daily and hourly weather history and a 15-day forecast for the locations you choose into your data warehouse, and join it with sales, footfall or delivery data to see how the weather affects your business.
Features
| Feature name | Supported | |
|---|---|---|
| Column Hashing | True | Column level |
| Blocking | True | Column level |
| Incremental | True | |
| Custom data | False | |
| History | True | |
| ReSync | True | Table level |
| Templates | False |
Data Schema
Setup Guide - ELT
Prerequisites
You need a Visual Crossing account and its API key. Weld uses the key on your own Visual Crossing plan, so the records Weld fetches count towards your plan's usage. You also need the latitude and longitude of each location you want weather for.
Step 1 - Copy your Visual Crossing API key
- Sign in to Visual Crossing.
- Open your account page and copy your API key.
Step 2 - Create the connection
- In the Weld app, click Data Sources in the sidebar, then Add Data Source.
- Search for Visual Crossing, select it and choose Create new connection.
- Give the connection a Name.
- Paste your API key, then click Connect.
Step 3 - Add your locations
In the sync settings, add each place you want weather for under Locations:
- Latitude and Longitude of the location, in decimal degrees (for example
55.6761and12.5683for Copenhagen). - ID (optional) identifies the location in your warehouse, in the
location_idcolumn of every table. Use something you can join on, such as a store number. If you leave it empty, Weld generates an ID when you save, and it stays the same even if you edit the coordinates later.
Don't change a location's ID after the first sync. Data already synced keeps the old ID, so the location would end up split across two IDs. Each location needs its own ID.
You can add, edit or remove locations later. A location added later is backfilled on its own from the sync's start date.
Set the Daily record limit to the most Visual Crossing records this connection may use per day (UTC). It defaults to 1,000, the limit of Visual Crossing's free plan. Each day of history costs 24 records per location, and each forecast costs 1 record per location. Set it to 0 if your Visual Crossing plan has no daily cap; otherwise the lowest allowed value is 24.
When the daily record limit is reached, history pauses for the affected locations and continues after midnight UTC, and the forecast is skipped for the locations it can't afford that day. A long backfill on a small limit can therefore take several days to complete.
Step 4 - Data To Sync
Select the tables you wish to include in the sync. You can view the schema, remove columns or hash sensitive information.
- History —
historyholds daily weather, one row per location per day, from the sync's start date up to yesterday. The tableshistory_hour(hourly weather),history_preciptypeandhistory_hour_preciptype(the day's and the hour's precipitation types) come along with it. - Forecast —
forecastholds the 15-day forecast for each location. Every forecast is stored with the date it was issued (forecast_issued_date), so earlier forecasts are kept next to later ones and you can compare them with what actually happened. The tablesforecast_hour,forecast_preciptypeandforecast_hour_preciptypecome along with it.
All measurements are in metric units (°C, mm, km/h, km). Hourly rows carry both the local hour and a UTC timestamp (datetime_epoch).
Step 5 - Configure sync
- Select how often you would like the data to sync.
- Choose a start date for the history backfill. If you don't set one, history starts one year back. Every day of history costs 24 records per location, so pick a start date that fits your daily record limit.
- Check the Destination schema name, which is where the tables land in your warehouse, and click Start Initial Sync.