Weather API
Weather API is a free service that offers information on forecasted, real-time, and historical weather, including marine weather.
This component enables users to load data from Weather API and bring it into Keboola.
Prerequisites
Section titled “Prerequisites”To use Weather API, you must first register to obtain an API token. Subscribe to the plan that fits your expected consumption.
Configuration
Section titled “Configuration”- Authentication
- Api Token: Your Weather API token
- Fetching Settings
- Parameters From
- Choose
Configuration Parametersto define the location, request type, and date range directly in the configuration. - Choose
Using an Input Tableto set the fetching parameters dynamically from an input table. This approach is beneficial when determining the location based on data from an upstream pipeline.
- Choose
- Request Type
- Choose
Forecastto obtain a forecast (useForecast daysto specify how many days ahead you want data for). - Choose
Historyto retrieve historical data. UseHistorical Dateto specify the period in the past.
- Choose
- Location Query (location_query): A query parameter for location. It can be latitude and longitude in decimal degrees, e.g., 48.8567,2.3508, a city name, e.g., Paris, or even an IP address like
100.0.0.1. Learn more in the documentation. - Forecast Days (forecast_days): The number of forecast days required.
- Historical Date (historical_date): The date from which to fetch historical data, either in
YYYY-MM-DDformat or a relative date likelast week. - Continue On Failure (continue_on_failure): A Boolean value. If set to
True, the process will continue dispite fetching errors, and failed responses will be saved in thefailed_fetches.csvfile. If set toFalse, the component run will terminate with an error as soon as one request fails.
- Parameters From
- Destination Settings (destination_settings)
- Load Type (load_type): If full load is selected, the destination table will be overwritten with every run. If incremental load is used, data will be upserted into the existing destination table. Full load overwrites the destination table each time.
If fetch_parameter_from is set to input_table, you can use a single input table to set fetching parameters.
- The table must have a ‘location’ column, or both
latitudeandlongitudecolumns to specify the data fetching location.- The location column can also contain other supported queries.
- If the request type is
forecast, you can include aforecast_dayscolumn. It will define theforecast_daysconfiguration value. If not provided, theforecast_daysvalue will default to 10. - If the request type is
history, ahistorical_datecolumn must be added. It will define thehistorical_dateconfiguration value.
Each row in the input table represents a single API request.
Output
Section titled “Output”There are four output tables:
weather_astronomical.csv: Contains daily historical and future astronomical data.weather_daily.csv: Contains daily forecasts and historical data.weather_hourly.csv: Contains hourly forecasts and historical data.failed_fetches.csv: If the ‘continue on failure’ parameter is set totrue, this table will record any errors that occurr during data fetching.