Skip to main content

pydtsx-parser

CI codecov PyPI Python versions CodeQL Docs License: MIT

Parse SQL Server Integration Services (SSIS) project files into structured, self-describing JSON — with no SSIS installation, no SQL Server, and no runtime dependencies.

Handles the four file types that make up an SSIS project:

File What it holds
.dtsx Packages: control flow, data flow pipelines, variables, connections
.dtproj Project manifest, deployment model, package list
.conmgr Project-level connection managers
.params Project parameters

Why

SSIS packages are large, deeply nested XML files that are painful to read and awkward to diff. If you are migrating away from SSIS, auditing what a package actually does, or documenting an inherited ETL estate, you need the structure out of that XML — task graphs, data lineage, embedded SQL, column mappings — without opening Visual Studio.

pydtsx-parser extracts all of it into one JSON envelope designed to be machine-readable and self-describing: the output carries its own data type map and a completeness summary of how many elements and attributes were seen.

Supported SSIS versions

The parser is version-agnostic by design: it has no version gates and no version-specific branches. Version markers such as LastModifiedProductVersion and the .dtproj ProductVersion are extracted and reported, but they never change how a file is parsed. "Supported" below therefore means verified, not enabled — an unlisted version is likely to parse.

SQL Server / SSIS Package format Status Verified by
2012 (11.0) SSIS.Package.3 Real package u2_toolkit/Package.dtsx, u2_toolkit/Project.dtproj
2014 (12.0) Microsoft.Package Real package u2_toolkit/PackageAzure.dtsx
2019 (15.0) Microsoft.Package Synthetic fixtures hand-written packages across the suite
2022 (16.0) Microsoft.Package Real packages the four ssis_examples/*.dtsx
2016 / 2017 (13.0 / 14.0) Microsoft.Package Expected to work, untested bracketed by the 2014 and 2019 cases
2008 and earlier SSIS.Package.2 and older Unknown no sample available; predates the .dtproj project deployment model

Both package format generations are covered by real files: the older SSIS.Package.3 form used by SSIS 2012, and the Microsoft.Package form used from 2014 onward. The real fixtures also span OLE DB, Flat File and ADO.NET connection managers — including a third-party ADO.NET provider — and both friendly-name and raw-GUID pipeline component class IDs.

Two gaps worth stating plainly:

  • Only the project deployment model is verified. The single real .dtproj declares DeploymentModel=Project (schema 9.0.1.0); the legacy package deployment model has no real-file coverage.
  • No real .conmgr file was available, so project-level connection managers are covered by synthetic fixtures only.

Provenance and the sanitisation applied to the real fixtures are documented in tests/fixtures/real_world/README.md.

Handling unknown content

With no version gating, an unfamiliar package generally parses. The completeness_summary on every parse result reports total_elements and total_attributes actually seen, so you can check a package was read in full rather than trusting silence. Note that its skipped_items field lists XML comments and processing instructions — deliberately ignored content — not elements the parser failed to understand.

Unrecognised executables and pipeline components are still emitted with their attributes and properties intact, keyed by whatever CreationName or componentClassID the file declares, so a third-party or newer component appears in the output even when the parser has no special knowledge of it.

Install

pip install pydtsx-parser

With the optional MCP server:

pip install "pydtsx-parser[mcp]"

Requires Python 3.11+.

Quick start

Parse a single package:

pydtsx-parser Package.dtsx --pretty

Parse an entire project directory (recursively discovers all four file types and cross-references them):

pydtsx-parser ./MyProject --pretty --output project.json

From Python:

from pydtsx_parser.dispatcher import dispatch

result = dispatch("Package.dtsx")
print(result["content"]["package_attributes"]["object_name"])

Output shape

{
  "format_version": "1.0.0",
  "parser_version": "0.1.0",
  "source_file_path": "/path/to/Package.dtsx",
  "file_type": "dtsx_package",
  "parsed_at": "2026-01-01T09:00:00+10:00",
  "source_file_metadata": { "file_name": "Package.dtsx", "file_size_bytes": 724, "owner": "..." },
  "data_type_map": { "130": "wstr", "131": "numeric", "...": "..." },
  "redaction_summary": { "total_redacted": 0 },
  "content": {
    "package_attributes": { "object_name": "LoadCustomers", "...": "..." },
    "variables": [ { "name": "BatchDate", "namespace": "User", "data_type": "7" } ],
    "connection_managers": [ { "object_name": "DW", "creation_name": "OLEDB" } ],
    "executables": [],
    "completeness_summary": { "total_elements": 6, "total_attributes": 11, "skipped_items": [] }
  }
}

CLI

usage: pydtsx-parser [-h] [--output OUTPUT] [--pretty] path

Parse SSIS files (.dtsx, .dtproj, .conmgr, .params) into JSON.

positional arguments:
  path                  File or directory path to parse

options:
  -h, --help            show this help message and exit
  --output OUTPUT, -o OUTPUT
                        Output file path (default: stdout)
  --pretty, -p          Pretty-print JSON with 2-space indent

Credential redaction

Passwords are redacted automatically — both as standalone fields and inside connection strings:

from pydtsx_parser.redaction import redact

redact({"connection_string": "Data Source=dbhost;User ID=svc;Password=hunter2;"})
# ({'connection_string': 'Data Source=dbhost;User ID=svc;Password=[SENSITIVE - REDACTED];'}, 1)

Schema metadata is deliberately left intact — a column named PASSWORD_HASH is structure, not a secret, so it is not redacted.

Handling real packages

Redaction covers credentials, not everything an SSIS file can reveal. Parser output also includes the source file's absolute path and its filesystem owner, and packages routinely embed internal server names, UNC paths, and schema names. Review parser output before attaching it to a public issue or sharing it outside your organisation.

MCP server

pydtsx-parser ships an optional MCP server so agents can explore SSIS packages directly. Install the extra, then point your client at the pydtsx-parser-mcp command:

{
  "mcpServers": {
    "pydtsx-parser": {
      "command": "pydtsx-parser-mcp"
    }
  }
}

Tools provided:

Tool Purpose
get_package_summary High-level overview — best first call
get_sql_code Extract embedded SQL statements
get_data_lineage Control flow edges plus source → destination tracing
get_data_flows Full data flow component detail and column mappings
parse_dtsx_file Full structured JSON for one file
parse_ssis_directory Full structured JSON for a project

A Claude Skill is also included, for a portable, dependency-free way to teach an agent how to use the CLI.

Documentation

Full documentation lives at lamiskin.github.io/pydtsx-parser — including the LLM context guide, a deep reference for interpreting the JSON output.

Development

uv sync
uv run pytest
uv run ruff check
uv run ruff format --check
uv run mypy

The test suite is fully synthetic — every input is constructed in-memory or written to a temp directory. No SSIS packages are bundled with this repository. Integration tests look for an optional local examples/ directory and skip cleanly when it is absent, so you can point them at your own packages without ever committing them.

See CONTRIBUTING.md for the full workflow.

Acknowledgements

This project was developed with AI assistance and validated against real-world SSIS projects. None of that data, its identifiers, or its history is included in this repository — no packages, no extracts, no connection details. The tests run entirely on synthetic fixtures.

License

MIT — see LICENSE.

SQL Server and SQL Server Integration Services are trademarks of Microsoft Corporation. This project is not affiliated with or endorsed by Microsoft.

Metadata

Release files for pydtsx-parser 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydtsx-parser 0.1.5
File Size Uploaded
pydtsx_parser-0.1.5.tar.gz 137.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydtsx-parser 0.1.5
File Interpreter ABI Platform
pydtsx_parser-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 194.7 kB

Release files / pydtsx_parser-0.1.5.tar.gz

Download URL pydtsx_parser-0.1.5.tar.gz
Size 137.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e0eacee74e9120906e212f544365c76d9a705d91c8272da1be304827eb0e3f4
BLAKE2b-256 checksum
How to use checksums
ed3633bef4f20907858eaef0205e945541b90f02f5c0ee1e76c23c7bcc6bbf1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / pydtsx_parser-0.1.5-py3-none-any.whl

Download URL pydtsx_parser-0.1.5-py3-none-any.whl
Size 56.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b89c78c184c3d1168bd07710557dc2a6576dd36ad23317887690139bb2683ea8
BLAKE2b-256 checksum
How to use checksums
f98b67593a4ca94c9985cc7122a277b1186ee6c12c326de34ae667e8c070aa45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.7

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page