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
validationType
input.
๐งญ 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
validationType
is 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
data
mode.
Status: Approved
Category: Protected
Authored By: Jeyakumar Arunagiri on July 14, 2025