Configure external datasets
This page describes an optional step to configure external datasets for the Cortex Framework Data Foundation deployment. Some advanced use cases might require external datasets to complement an enterprise system of record. In addition to external exchanges consumed from Analytics Hub, some datasets might need custom or tailored methods to ingest data and join them with the reporting models.
Configure the Directed Acyclic Graphs (DAGs) for the supported external datasets following these steps:
Holiday Calendar: This DAG retrieves the special dates from PyPi Holidays.
- Adjust the list of countries, the list of years, as well as other DAG parameters
to retrieve holidays in
holiday_calendar.ini
.
- Adjust the list of countries, the list of years, as well as other DAG parameters
to retrieve holidays in
Trends: This DAG retrieves Interest Over Time for a specific set of terms from Google Search trends. The terms can be configured in
trends.ini
.- After an initial run, adjust the
start_date
to'today 7-d'
intrends.ini
. - Get familiarized with the results coming from the different terms to tune parameters.
- We recommend partitioning large lists to multiple copies of this DAG running at different times.
- For more information about the underlying library being used, see Pytrends.
- After an initial run, adjust the
Weather: By default, this DAG uses the publicly available test dataset
BigQuery-public-data.geo_openstreetmap.planet_layers
. The query also relies on an NOAA dataset only available through Analytics Hub:noaa_global_forecast_system
.This dataset needs to be created in the same region as the other datasets prior to executing deployment. If the datasets aren't available in your region, you can continue with the following instructions to transfer the data into the chosen region:
- Go to BigQuery Analytics Hub.
- Click Search Listings.
- Search for NOAA Global Forecast System.
- Click Add dataset to project.
- When prompted, keep
noaa_global_forecast_system
as the name of the dataset. If needed, adjust the name of the dataset and table in the FROM clauses inweather_daily.sql
. - Repeat the listing search for Dataset
OpenStreetMap Public Dataset
. - Adjust the
FROM
clauses containing:BigQuery-public-data.geo_openstreetmap.planet_layers
inpostcode.sql
.
Sustainability and ESG insights: Cortex Framework combines SAP supplier performance data with advanced ESG insights to compare delivery performance, sustainability and risks more holistically across global operations. For more information, see the Dun & Bradstreet data source.
General considerations
Analytics Hub is only supported in EU and US locations, and some datasets, such as NOAA Global Forecast, are only offered in a single multi location.
If you are targeting a location different from the one available for the required dataset, we recommended to create a scheduled query to copy the new records from the Analytics Hub linked dataset followed by a transfer service to copy those new records into a dataset located in the same location or region as the rest of your deployment. You then need to adjust the SQL files.
Before copying these DAGs to Cloud Composer, add the required python modules as dependencies:
Required modules: pytrends~=4.9.2 holidays