How to Run the Connector Externally
To run the Ingestion via the UI you’ll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check the following docs to run the Ingestion Framework anywhere.External Schedulers
Get more information about running the Ingestion Framework Externally
Requirements
MSSQL User must grantSELECT privilege to fetch the metadata of tables and views.
View Definitions
Usage & Lineage consideration
To perform the query analysis for Usage and Lineage computation, the connector reads query history from SQL Server’s Query Store when it is enabled on a database. Query Store exposes this history throughsys.query_store_query, sys.query_store_query_text, sys.query_store_plan, and sys.query_store_runtime_stats. Query Store keeps a durable, on-disk record of executed queries. The plan-cache Dynamic Management Views (DMVs) (sys.dm_exec_cached_plans, sys.dm_exec_query_stats, and sys.dm_exec_sql_text) are evicted on server restart, memory pressure, or plan recompilation, and can silently return incomplete history.
Query Store is auto-detected per database. No configuration is needed. When ingestAllDatabases is enabled, each database is read from its own best source independently: databases with Query Store use it, and the rest fall back to the plan-cache DMVs, so one database without Query Store never downgrades the others.
To check whether Query Store is enabled on a database, and how it is currently operating:
QUERY_CAPTURE_MODE on SQL Server 2019 and later is AUTO, which can skip queries that only run a few times, such as a one-off data migration statement. Setting it to ALL ensures every query is captured for lineage. Set STALE_QUERY_THRESHOLD_DAYS to cover at least your ingestion lookback window, so queries are not purged before they are read. Query Store’s default SIZE_BASED_CLEANUP_MODE purges the oldest queries to stay within MAX_STORAGE_SIZE_MB, which reduces the risk of Query Store switching to read-only. Under heavy write load, cleanup can still fall behind, and Query Store can switch to read-only temporarily until it catches up.
Database-level, for Query Store metadata: VIEW DATABASE STATE (SQL Server 2016-2019) or VIEW DATABASE PERFORMANCE STATE (SQL Server 2022 and later).
VIEW SERVER STATE (SQL Server 2019 and earlier) or VIEW SERVER PERFORMANCE STATE (SQL Server 2022 and later).
sys.database_query_store_options and the Microsoft documentation for your instance.
Python Requirements
To run the MSSQL ingestion, you will need to install:Metadata Ingestion
All connectors are defined as JSON Schemas. Here you can find the structure to create a connection to MSSQL. In order to create and run a Metadata Ingestion workflow, we will follow the steps to create a YAML configuration able to connect to the source, process the Entities if needed, and reach the OpenMetadata server. The workflow is modeled around the following JSON Schema1. Define the YAML Config
This is a sample config for MSSQL:2. Run with the CLI
First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:Query Usage
The Query Usage workflow will be using thequery-parser processor.
After running a Metadata Ingestion workflow, we can run Query Usage workflow.
While the serviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.
1. Define the YAML Config
This is a sample config for Usage:2. Run with the CLI
After saving the YAML config, we will run the command the same way we did for the metadata ingestion:Lineage
After running a Metadata Ingestion workflow, we can run Lineage workflow. While theserviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.
1. Define the YAML Config
This is a sample config for Lineage:- You can learn more about how to configure and run the Lineage Workflow to extract Lineage data from here
2. Run with the CLI
After saving the YAML config, we will run the command the same way we did for the metadata ingestion:Data Profiler
The Data Profiler workflow will be using theorm-profiler processor.
After running a Metadata Ingestion workflow, we can run the Data Profiler workflow.
While the serviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.
1. Define the YAML Config
This is a sample config for the profiler:- You can learn more about how to configure and run the Profiler Workflow to extract Profiler data and execute the Data Quality from here
2. Run with the CLI
After saving the YAML config, we will run the command the same way we did for the metadata ingestion:ingest, we are using the profile command to select the Profiler workflow.
Data Profiler
Find more information about the Data Profiler here
Auto Classification
The Auto Classification workflow will be using theorm-profiler processor.
After running a Metadata Ingestion workflow, we can run the Auto Classification workflow.
While the serviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.
1. Define the YAML Config
This is a sample config for the Auto Classification Workflow:2. Run with the CLI
After saving the YAML config, we will run the command the same way we did for the metadata ingestion:Data Quality
Adding Data Quality Test Cases from yaml config
When creating a JSON config for a test workflow the source configuration is very simple.serviceName (this name needs to be unique) and entityFullyQualifiedName (the entity for which we’ll be executing tests against) keys.
Once you have defined your source configuration you’ll need to define te processor configuration.
"orm-test-runner". For accepted test definition names and parameter value names refer to the tests page.
You can keep your YAML config as simple as follows if the table already has tests.
Key reference:
forceUpdate: if the test case exists (base on the test case name) for the entity, implements the strategy to follow when running the test (i.e. whether or not to update parameters)testCases: list of test cases to add to the entity referenced. Note that we will execute all the tests present in the Table.name: test case nametestDefinitionName: test definitioncolumnName: only applies to column test. The name of the column to run the test againstparameterValues: parameter values of the test
sink and workflowConfig will have the same settings as the ingestion and profiler workflow.