Firestore to BigQuery Validation Workflow
This document provides a step-by-step guide to run the GitHub Actions workflow for validating Firestore data against BigQuery schema and data.
π Overviewβ
The GitHub Actions workflow titled:
<env> β Firestore to BigQuery Enquiry Validation (Schema/Data)
is used to:
- β Validate Firestore data against BigQuery schema.
- β Validate Firestore data against BigQuery data.
π The same workflow handles both schema and data validation. You can select the mode using the
validationTypeinput.
π§ Navigate & Launch the Workflowβ
1. Open the GitHub Repositoryβ
Go to the visn-devops-scripts repository.
2. Access the Workflowβ
- Click the Actions tab.
- Select the workflow named:
<env> β Firestore to BigQuery Enquiry Validation (Schema/Data)
3. Run the Workflowβ
- Click the Run workflow button (top-right).
- Select the target branch (e.g.,
sprint123-feature-narwhal). - A form will appear with input fields.

π§Ύ Required Inputsβ
The form requires the following parameters:
| Parameter | Required | Description |
|---|---|---|
| Lease Company ID | β | Firestore document ID for the leasing company. |
| Account ID | β | The account ID. |
| Service Unit ID | β | ID of the service unit related to the enquiry. |
| Enquiry ID | β | Firestore document ID of the enquiry to validate. |
| Validation Type | β | Select either schema or data based on what you want to validate. |
| Generate Schema if Fields Missing | β οΈ Only for schema | When set to true, the script auto-generates missing fields BigQuery schema. If false, it only reports them. |
β οΈ The "Generate Schema" field only appears when
validationTypeis set toschema.
β Validation Modesβ
π 1. Schema Validation (validationType = schema)β
This mode checks whether the Firestore document fields match the BigQuery schema.
You will be prompted with:
Generate schema if fields are missing?
Choose:
trueβ The workflow will automatically generate the missing fields schema.falseβ The workflow will only report missing fields without altering the schema.
π 2. Data Validation (validationType = data)β
This mode checks that the values in Firestore documents exist in BigQuery and match exactly. It detects:
- Missing documents
- Mismatched values
βΆοΈ Executing the Workflowβ
Once all input fields are completed:
- Click Run workflow again to start execution.
- GitHub Actions will queue and run the job with your selected parameters.
π Reviewing the Resultsβ
1. Open the Workflow Runβ
- Go to the Actions tab.
- Select the recent run of the workflow under your branch and environment.
2. Locate the Validation Stepβ
Find the step titled:
Run Firestore Validator based on selected validation type
3. Analyze the Logsβ
If validationType = schema:β
- Logs will show:
- Logs will list any missing fields.
- Youβll see if fields were auto-generated (if enabled).

Auto-generated Schema:

If validationType = data:β
-
Logs will show:
- Fields present in Firestore but missing in BigQuery.
- Mismatched values between Firestore and BigQuery rows.

πΌοΈ UI Referenceβ
Below is an example of how the workflow input form appears in GitHub Actions:

Features visible in the UI:
- Workflow name with environment:
DEV β Firestore to BigQuery Enquiry Validation (Schema/Data) - Manual branch selector (e.g.,
sprint123-feature-narwhal) - Input fields for:
- Lease Company ID
- Account ID
- Service Unit ID
- Enquiry ID
- Validation Type
- Schema generation toggle (for schema validation)
π‘ Tipsβ
- Always verify you're selecting the correct environment and branch before running.
π Notesβ
<env>refers to your environment:DEV,DEMO, orPROD.- Only users with appropriate permissions can trigger workflows and view logs.
- Schema generation is not available in
datamode.
Status: Approved
Category: Protected
Authored By: Jeyakumar Arunagiri on July 14, 2025