microsoft / microsoft/DacFx

Enable native JSON and HTML output formats for sqlpackage.exe drift/deploy reports (/Action:DriftReport, /Action:DeployReport)

Open
#752 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

**Is your feature request related to a problem? Please describe.**
Yes. Today, **sqlpackage.exe** only produces XML output for **/Action:DriftReport** and **/Action:DeployReport**.

While XML is human-readable, it is cumbersome to work with in modern CI/CD pipelines and automation workflows. Consuming these reports programmatically requires teams to build and maintain custom XML transformations (XSLT, PowerShell, or bespoke parsing code) just to extract basic information. This adds unnecessary complexity, increases maintenance cost, and makes it difficult to integrate drift and deploy reports with modern tooling and policy engines.

**Describe the solution you'd like**
Add native JSON and HTML output options for drift and deploy reports generated by sqlpackage.exe. Ideally, this would be exposed via a new parameter such as **/ReportFormat:{Xml|Json|Html}** (defaulting to XML for backward compatibility).

JSON output should be structured, versioned, and suitable for direct consumption by tools like jq, CI/CD quality gates, and policy checks.

HTML output should be clean and self-contained, suitable for publishing as a pipeline artifact or for change review without requiring post-processing.

This would eliminate the need for custom transformations and make drift/deploy reports first-class citizens in modern DevOps workflows.

**Describe alternatives you've considered**
Writing custom XSLT or PowerShell scripts to transform the XML into JSON or HTML.

Using third-party tools or ad-hoc parsers to scrape the XML output.

These approaches are brittle, version-sensitive, and require ongoing maintenance whenever the XML structure changes. They also slow adoption and make it harder to integrate with standard tooling such as jq, GitHub Actions, or Azure DevOps quality gates.

**Additional context**
Native JSON output would allow teams to:

Parse and filter changes using standard tools (jq, PowerShell, Python, etc.)

Enforce automated policy checks in CI/CD (e.g., blocking destructive schema changes)

Store structured audit artifacts over time

Native HTML output would enable:

Easy publishing of deploy/drift reports as build artifacts

Better visibility during PR and release reviews

Providing these formats directly from sqlpackage.exe would significantly reduce friction and align the tool with modern DevOps and data platform practices.

Contributor guide

Open the contributing guide

Research direction

Start by locating the sqlpackage.exe handling for /Action:DriftReport and /Action:DeployReport, then trace how the current XML report is selected and emitted. Define how /ReportFormat:{Xml|Json|Html} should preserve XML compatibility while producing structured JSON and self-contained HTML. Done means both actions support all requested formats and their outputs work for CI/CD consumption and review.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
cli, databases, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.