Skip to main content
In this guide, you add two activities to the end of a Fabric pipeline. The first asks General Validation to prepare a Run. The second runs it, and fails your pipeline when the Tables don’t match.
Screenshot of a Fabric pipeline with a Web activity named Prepare validation followed by an Invoke pipeline activity named Run validation.

Prerequisites

  • A General Validation Environment that is set up.
  • A test set with the Tests you want to run.
  • A Microsoft Entra administrator, to approve one permission in step 2.

Step 1: Register an application

Your pipeline signs in to General Validation as an application you own.
  1. In the Microsoft Entra admin center, go to Entra ID > App registrations and select New registration.
    Screenshot of the Microsoft Entra admin center with App registrations in the menu and New registration highlighted.
  2. Enter a name and select Register.
    Screenshot of the Register an application form with the name and the Register button highlighted.
  3. On the Overview page, copy the Application (client) ID and the Directory (tenant) ID. You need both in step 4.
    Screenshot of an application's Overview page with Application (client) ID and Directory (tenant) ID highlighted.

Step 2: Give the application access to General Validation

  1. In the application’s menu, select API permissions, then Add a permission.
    Screenshot of the API permissions page with API permissions and Add a permission highlighted.
  2. Select APIs my organization uses, search for General Validation, and select General Validation Cloud API.
    Screenshot of the Request API permissions pane with the APIs my organization uses tab and General Validation Cloud API highlighted.
  3. Select Application permissions, tick GV.APIContributor, and select Add permissions.
    Screenshot of the General Validation Cloud API permissions with Application permissions, GV.APIContributor, and Add permissions highlighted.
  4. Select Grant admin consent, next to Add a permission, and confirm. The status changes to Granted.
    Screenshot of the permissions list with the GV.APIContributor status showing Granted.

Step 3: Create a client secret

  1. In the application’s menu, select Certificates & secrets.
    Screenshot of an application's menu with Certificates and secrets highlighted.
  2. Select New client secret, enter a description, and select Add.
  3. Copy the secret’s Value. Entra shows it only once.
The secret goes into your Fabric connection in the next step and nowhere else. General Validation never receives it.

Step 4: Create the connection to General Validation

  1. In Fabric, select the gear icon, then Manage connections and gateways.
    Screenshot of a Fabric workspace with the Settings pane open, and the gear icon and Manage connections and gateways highlighted.
  2. Select New.
    Screenshot of Fabric's Manage Connections and Gateways page with New highlighted.
  3. Select Cloud and fill in the form.
    Screenshot of Fabric's New connection pane filled in for a Web v2 connection that signs in with a service principal.
  4. Select Create.

Step 5: Create the connection that runs validation

  1. Select New again, then Cloud, and fill in the form.
    Screenshot of Fabric's New connection pane filled in for a Fabric Data Pipelines connection that uses the workspace identity.
  2. Select Create.

Step 6: Allow your pipeline’s workspace to run validation

  1. Open the workspace with your pipeline and select Workspace settings.
    Screenshot of a Fabric workspace with Workspace settings highlighted.
  2. Select Workspace identity. If the workspace has no identity yet, select + Workspace identity to create one.
    Screenshot of Workspace settings with Workspace identity highlighted and the identity's details shown.
  3. Open your General Validation workspace, the one whose name starts with General Validation, and select Manage access.
    Screenshot of the General Validation workspace in Fabric with Manage access highlighted.
  4. Select Add people or groups. Search for the name of your pipeline’s workspace, choose Contributor, and select Add.
    Screenshot of the Add people pane with a workspace's identity selected and the Contributor role chosen.
Contributor on the General Validation workspace can also read the Results Lakehouse, so grant it only to pipeline workspaces you trust with those Results. Allow a few minutes after granting the role before your first run while Fabric applies it.

Step 7: Copy the request for your test set

  1. In General Validation, select Tests and open your test set.
    Screenshot of the Tests page in General Validation with Tests and a test set highlighted.
  2. Under Run from your pipeline, select Copy. The request already includes your test set’s ID.
    Screenshot of the Run from your pipeline panel with Copy and the test set ID highlighted.

Step 8: Add the two activities to your pipeline

Add them after the activity that finishes loading your target Table.
  1. Open your pipeline. On the Activities tab, select Web and name the activity Prepare validation.
    Screenshot of the Fabric pipeline editor with the Activities tab and Web highlighted.
  2. On the activity’s Settings tab, fill in the fields.
    Screenshot of the Prepare validation activity selected on the canvas, with its Settings tab showing the connection, relative URL, method, body, and header.
    In the body, use @{guid()} as the id, and give each Table’s workspace ID, Lakehouse ID, and path. Both IDs are in the Lakehouse’s address in Fabric.
  3. On the General tab, expand Advanced and tick Secure output.
    Screenshot of the Prepare validation activity's General tab with Secure output ticked.
  4. On the Home tab, select Invoke pipeline. Name the activity Run validation and connect it to run after Prepare validation.
    Screenshot of the Fabric pipeline editor with the Home tab and Invoke pipeline highlighted.
  5. On its Settings tab, choose Fabric, the Run General Validation connection, your General Validation workspace, and the pipeline named General Validation. Then set the parameters.
    Screenshot of the Run validation activity selected on the canvas, with its Settings tab showing the connection, workspace, pipeline, and parameters.
  6. On the General tab of Run validation, expand Advanced, tick Secure input (so report_token is not logged), and set an activity timeout. Keep Retry at 0 on both Prepare validation and Run validation.
To validate an existing Table Pair instead of naming source and target Tables, send @concat('{"id":"', guid(), '","pair_id":"<pair-id>"}') as the body of Prepare validation. To validate whichever Table a run loaded, use your pipeline’s parameters in the body, for example Tables/bronze/@{pipeline().parameters.table} as the path. Each source gets its own Table Pair the first time it is validated.

Step 9: Run your pipeline

Run your pipeline. When the Tables match, Run validation succeeds and your pipeline continues. When they don’t, Run validation fails with the verdict and a link to the Run, and the activities after it don’t run. Open Results in General Validation to see each Run.
Screenshot of the Results page in General Validation with Results and a Run's Passed result highlighted.
General Validation needs read access to each Table it compares. If a Run ends with Could not read a Table, open the Table Pair in General Validation, copy the snippet from Access for validation and run it in a Fabric notebook as a workspace Admin (or send the request it shows), and run your pipeline again.

Step 10: Run your pipeline on a schedule

This step is optional. Fabric starts your pipeline at the times you choose.
  1. Open your pipeline. On the Home tab, select Schedule, then Add Schedule.
  2. Choose how often it runs, its start and end dates, and your time zone, then select Save.
  3. To get Fabric’s email when a scheduled run fails, add people or groups under Failure notifications.
Fabric runs a schedule as the person who last saved it, and the schedule expires when that person has not signed in to Fabric for 90 days. Fabric also turns a schedule off after about 10 failed runs in a row, and Run validation fails whenever the Tables don’t match. Set up Monitoring and alerts so General Validation tells you about the first failure. See Scheduled pipeline runs on Microsoft Learn.

Troubleshooting

  • First run fails with “unable to acquire user token”. The first time your pipeline workspace’s identity invokes the validation pipeline, Fabric can fail to start it with the message "Job failed to start: unable to acquire user token". The Invoke pipeline activity can take about half an hour to report this. Validation did not run, and the Run stays Prepared until it ends in Error. Run your pipeline again, which prepares new Runs.
  • Keep Retry at 0 on both activities. A retried Web activity prepares a second Run, and a Run that has already started cannot be run again.
  • Sequential ForEach behavior. Inside a sequential ForEach, items after a failed validation still run, and the ForEach activity then fails with the first failure’s message.