Runs the batch processing workflows. There are two Dataform repositories for development and production.
The test repository is used for development and testing purposes and not connected to the rest of the pipeline infra.
Pipelines can be run manually from the Dataform UI or orchestrated automatically via Apache Airflow.
The infrastructure configurations are in the tech-report-apis monorepo. Refer to terraform/dataform.tf and terraform/airflow.tf for Dataform and Composer IaC.
Production pipeline invocations are managed by Google Cloud Composer (httparchive-pipelines). The DAG definitions are maintained in airflow/dags/:
-
crawl_completeDAG (airflow/dags/crawl_complete.py):- Triggered by the
crawl-completePub/Sub topic viaPubSubPullSensor. - Executes
sync_public_suffix_listtask to fetch the full Public Suffix List (ICANN + private) intohttparchive.urls.public_suffix_list. - Creates a compilation result against the production release config and invokes Dataform with tags:
crawl_completecrawl_complete_reports
- Triggered by the
-
crux_readyDAG (airflow/dags/crux_ready.py):- Scheduled at 08:00, 12:00, and 16:00 UTC during the CrUX release window (8th–14th of each month).
- Sensor queries BigQuery to verify that the previous month's
chrome-ux-reporttable has been published. - Creates a compilation result and invokes Dataform with tags:
crux_readycrux_ready_reports
Airflow DAGs are automatically synchronized from airflow/dags/ to the Cloud Composer Cloud Storage bucket (gs://us-central1-httparchive-pip-77e1b883-bucket/dags) via the Deploy Airflow DAGs GitHub Actions workflow on merge to main.
- Create new dev workspace in test Dataform repository.
- Make adjustments to the dataform configuration files and manually run a workflow to verify.
- Push all your changes to a dev branch & open a PR with the link to the BigQuery artifacts generated in the test workflow.
Some useful hints:
- In workflow settings vars set
dev_name: devto process sampled data in dev workspace. - Change
current_monthvariable to a month in the past. May be helpful for testing pipelines based onchrome-ux-reportdata. definitions/extra/test_env.sqlxscript helps to setup the tables required to run pipelines when in dev workspace. It's disabled by default.
- In
workflow_settings.yamlsetenvironment: devto process sampled data. - For development and testing, you can modify variables in
includes/constants.js, but note that these are programmatically generated.
airflow/- Cloud Composer / Apache Airflow DAG definitions and helper modulesdags/- Production Airflow DAGs (crawl_complete.py,crux_ready.py) and shared utilities (common/)
definitions/- Contains the core Dataform SQL definitions and declarationsoutput/- Contains the main pipeline transformation logicdeclarations/- Contains referenced tables/views declarations and external resources
includes/- Contains shared JavaScript utilities and constantsdocs/- Additional documentation
GitHub PAT saved to a Secret Manager secret.
- repository: HTTPArchive/dataform
- permissions:
- Commit statuses: read
- Contents: read