Why custom profiler metrics in OpenMetadata matter for business owners
Custom profiler metrics are SQL-defined measures attached to a table or column that run during profiling and are stored as history in OpenMetadata, so a business rule can be tracked over time next to the built-in figures. Built-in metrics such as null counts and distinct counts describe the shape of the data, but they cannot express a rule like the number of active accounts or the share of orders whose value falls outside an approved policy limit. A business owner needs a custom metric when the question is what the business means by a value and the answer depends on a definition the team has agreed on. Ask the data owner to write that definition in plain terms first, then translate it into a query.
Choose the lighter tool when it answers the question. Built-in profiler metrics suit general health checks across profiled tables, and data quality tests suit a pass or fail rule that should raise an alert and open an incident when it breaks. A custom metric fits a measure you want to watch as a trend, such as a count or ratio that moves gradually and should be read against its own history. If a rule must block a load or notify someone at a threshold, a test is usually the right home, and a custom metric can sit beside it for context. Defining the same logic in both places creates two versions that drift apart, so decide which one is the source of truth before the first query is written.
Before building anything, confirm in the current OpenMetadata documentation for your version how custom metrics are defined in the UI or API, which profiling runs execute them, what history they keep, and which roles can create them. These details change between releases, so check them in the version you run instead of copying settings from another instance. Ask the business owner to sign off on the metric name, its plain-language definition, the columns and filters it depends on, and who responds when the trend moves. Run the SQL by hand against a representative dataset first, because a slow or ambiguous query will be repeated on every profiling run and recorded in the history it produces.
Configuration options for custom profiler metrics and when each fits
This table compares the choices a team makes when defining a custom profiler metric, including scope, the SQL expression, the result type and whether the metric runs on the full table or a sample. Read each row against the metric's purpose: the option that fits best is usually the one that keeps the metric comparable from run to run at an acceptable warehouse cost. Confirm the exact field names and UI locations in the OpenMetadata version your team runs before writing definitions.
| Decision | When it fits | Warehouse compute and trade-offs | Effect on comparability over time |
|---|---|---|---|
| Table-level scope | A rule about the whole table, such as total row count of a qualifying population or a count of distinct order keys across the table. | Usually one aggregate query per run against the table. Cost grows with table size and with how often the profiler runs. | Stable if the table's grain and filters stay fixed. Schema or business-logic changes can shift the value without any data problem. |
| Column-level scope | A rule about one field, such as the share of records with a valid postal code or the average basket value for a given column. | Often narrower reads than table scope, but many column metrics on a wide table add up. Limit them to columns that matter to owners. | Easy to trend per column. Renaming or retyping the column can break the series, so record the column version in the metric description. |
| SQL expression and columns read | A metric that needs a business condition, such as counting only active accounts, which built-in metrics cannot express. | Complex joins or subqueries in the expression raise compute cost. Reading only the columns the expression needs keeps scans smaller. | Every change to filters, joins or null handling changes the meaning of the number. Version the expression and note changes next to the trend. |
| Result data type | A numeric result for ratios, counts and sums, or a text or boolean result only where the platform supports it. | Type choice has little direct cost, but casting inside the expression can add work. Confirm which result types your version stores and charts. | Mixing types or changing a type mid-series prevents clean charting. Decide the type before the first run. |
| Full-table execution | A metric where exactness matters, such as a control total used for reconciliation or a regulatory count. | Highest compute per run because every row is read. Schedule it outside peak warehouse hours where possible. | Most accurate and most comparable across runs, since every row is included each time. |
| Sampled execution | An exploratory or high-volume metric where a close estimate is enough to spot drift. | Lower compute per run, but sample size and selection method affect the result. Confirm how your version's sampling is configured. | Values move with the sample, so small changes can be sampling noise. Keep the sampling settings fixed for the life of the metric. |
| Dynamic sampling as profiler default | A team that relies on the default profiler behavior in OpenMetadata 2.0 and wants custom metrics to follow the same sampling. | Cost follows the default sampling settings and the table size. Check whether custom metrics inherit these settings in your version. | Changes to default sampling affect comparability. Record the sampling mode alongside each metric so later reviewers can interpret shifts. |
How a profiler run evaluates built-in and custom metrics
A profiler run starts from a schedule or a manual trigger in the ingestion runner, which connects to the warehouse using credentials it reads at run time. The runner executes the built-in metric queries and then each custom SQL metric against the customer's database, so the metric queries run inside the customer's trust boundary. Results are written back to the OpenMetadata server, where they join the profile history and appear on the asset page. Check that the database user can run every custom query and that the results land on the expected asset.
Profiler run: built-in and custom metrics execute in the warehouse and results return to OpenMetadata.
Adding a SQL-defined metric to a table or column profile, step by step
This sequence takes a business metric written as SQL from an idea to a value tracked in OpenMetadata's profile history, with a check at each stage so the catalog number can be trusted.
Confirm profiler and service account access
The data platform or governance owner checks that the target table is included in a profiler workflow in OpenMetadata and that the ingestion service account can select from that table and its schema. Confirm the account's read permissions in the warehouse directly, not only in the catalog, because a permission gap often shows up as a missing or empty profile rather than a clear error. The step is done when a profiler run for the table completes and the built-in column metrics appear on the asset page. Exact screens and settings depend on the installed OpenMetadata version, so confirm them against the release you run.
Write and test the SQL expression
The analyst or engineer writes the metric as a single SQL expression that returns one value for the table or column, such as a count of rows matching a business rule or a share of non-null values in a column. Run the expression against a non-production copy of the data, not the live warehouse, and confirm the result is a single scalar with the expected data type. Record the expression, the filter logic and the expected range in the change record so reviewers can compare it later. The step is done when the expression returns a sensible value on the copy and a reviewer has read the logic.
Define the metric at the right scope
In OpenMetadata, add the custom metric to the table or column profile using the metric definition interface or the API, as the installed version supports. Choose table scope for row-level business rules and column scope when the expression depends on one field, and set a clear name and description that match the business definition. Keep the SQL identical to the tested version to avoid drift between the copy and production. The step is done when the metric is saved on the intended asset and shows in its definition with the correct scope.
Run the profiler on the target asset
Trigger a profiler run for the table through the ingestion workflow, either manually or on the existing schedule. Watch the run logs for the custom metric, since a SQL error in one metric can fail or skip it while built-in metrics still complete. The step is done when the run finishes successfully and the logs show the custom metric was executed against the target asset.
Compare the profiled value with a manual query
Run the same SQL directly in the warehouse against production, at the same point in time as the profiler run, and compare the result with the value OpenMetadata recorded. Differences often come from a different time window, a stale source table, a sampling setting or a changed filter, so check each of these before accepting the result. The step is done when the two values match or the cause of any difference is documented and resolved. Do not treat the profiler value as correct until this comparison has been made.
Confirm the value in profile history
Open the table or column profile in OpenMetadata and check that the custom metric appears alongside the built-in profiler metrics for the run. Run the profiler a second time, or wait for the next scheduled run, and confirm that a new data point is added instead of overwriting the first one. The step is done when at least two runs show the metric in the history view, which confirms it is tracked over time as intended. If history does not appear, confirm the feature set and retention behavior in your installed version before changing the expression.
Trade-offs between custom metrics, built-in profiling and data quality tests
The decision is which business rules should become data quality tests and which should become tracked custom metrics. A custom profiler metric records a value on each profiling run and builds a trend over time. A data quality test passes or fails against a threshold you define, and a failure can open an incident for an owner to triage. If a rule must stop a pipeline or page someone when it breaks, it belongs in a test. If the business needs to see whether a value drifts, such as the share of orders with a missing region, a trend is usually the better fit. Built-in profiling sits underneath both, and it already gives you counts, nulls and distributions for each column without any SQL from you.
Custom metrics are SQL queries, so each one runs against your warehouse on every profiling run that includes its table. The cost is driven by how many metrics you define, how large the tables are, how often profiling runs, and whether the queries scan full tables or filtered partitions. Confirm with your warehouse team how each metric query is billed and how it interacts with your profiling schedule before you add metrics to large fact tables. Metric sprawl is the other risk. A metric added per request, across hundreds of tables, quickly becomes a set of values nobody reads. Agree on a naming convention that encodes the domain, table and business meaning, and assign a single named owner to every metric who decides when it is retired or changed.
Before creating anything, write a short register of candidate rules and label each one as a test, a trend or neither. Ask the owner what action a bad value should trigger, and if the answer is a person looking at a chart, a trend is enough. Check the feature documentation for your OpenMetadata version before you rely on specific metric types or how results appear on the asset page, because these details change between releases. Keep the register under version control or in the catalog so reviews can see what was added and why.
Security and access considerations for SQL metrics in the catalog
A custom metric is SQL that runs against your warehouse and returns a result to anyone who can open the asset page. The cards below cover who writes that SQL, which database account runs it, who sees the output, how changes are recorded, and where warehouse credentials sit, so your security team can verify each one before the metrics go live.
Who can write metric SQL
Anyone allowed to create or edit a custom metric can write SQL that the profiler runs on a schedule against production tables. A poorly written query can scan full history tables, hold warehouse compute, or select sensitive columns that the metric was never meant to expose. Ask which OpenMetadata roles can create or edit metrics in your version, and whether a reviewer must approve new SQL before it runs. Confirm this in your version's permissions model.
Security docsRead-only profiler database account
The profiler connects with a database account set up in the warehouse, and that account determines what any metric SQL can read or change. Grant it SELECT on the tables it must profile and nothing that writes, creates or drops objects. Check the grants directly in the warehouse rather than trusting the connection form. Because metric SQL runs under this account, its privileges define the blast radius of a bad or malicious definition.
Visibility of metric results
Metric results appear on the asset page, so every user who can view that table or column can also see the computed values over time. A metric that counts or averages a sensitive field can reveal information even when the raw column is masked elsewhere. Review which metrics sit on classified or restricted assets, and confirm that the catalog's view permissions match the sensitivity of the output, not just the source table.
Audit trail for definition changes
A metric definition can change after it is approved, and the history of those edits is what your auditors will ask for. Verify that OpenMetadata records who created, edited or disabled a custom metric and when, and export that history on a schedule. Also confirm how audit records are retained and whether they reach your central logging platform. Treat the entry point as a control to test, not a feature to assume.
Warehouse credential handling
The connection that lets the profiler run metric SQL holds a warehouse password or key, so its storage and rotation matter as much as the metric itself. Confirm that the credential is held in a secrets store you control, that it is not visible in the UI or in exported connection configuration, and that rotation can happen without editing every metric. Confirm the supported secret-storage options for your deployment with the vendor, since they vary by version.
Keeping metric history useful after the first month
A custom profiler metric is only worth its history if someone is responsible for it. Assign a named owner to every SQL-defined metric when it is created, and record who that person is in the metric's description or the asset's ownership field so that questions about a changing value reach someone who knows the business definition. Without an owner, the metric keeps running after the team that needed it has moved on, and its trend line becomes a number nobody can explain. Review ownership whenever a team changes, since the person who wrote the query is often not the person who answers for its results.
Metric definitions drift, so the owner needs a standing check. After a schema change in the source table, a renamed column, a new status code or a change to how a upstream pipeline fills a field, confirm that the SQL still matches the business definition it was written for. Treat any edit to the metric's SQL as a new definition. A metric that changes its SQL breaks comparability with earlier history, so record the date, the reason and the author of each definition change next to the metric, and state in that record whether the earlier values were recomputed. Readers comparing a trend across the change need that note more than the new query.
Retire metrics that nobody reads. Each custom metric adds a query to the profiling run, so a metric that no dashboard, report or steward consults is cost without benefit. Before deleting one, confirm with its owner and check whether any downstream consumers rely on its results, then remove it and keep its historical values if your retention rules allow. Finally, check the profiler schedule against your warehouse's busy periods. Ask your data platform team for its peak load windows, confirm that the profiler runs fall outside them, and re-check after new workloads or larger tables are added, because a schedule that was quiet last quarter can collide with month-end processing.
Limits to confirm in your environment before rollout
Custom profiler metrics depend on the connector, the warehouse, the sampling setup and the release you run. The cards below list the items to confirm in a test environment before any business metric is treated as a trusted series.
Connector and warehouse support
Confirm which connectors and warehouses accept custom profiler metrics in the OpenMetadata version you will install, since profiling support differs by source. Ask the vendor for the supported list, then run one metric on each source type you plan to cover. Record whether the metric runs, where it fails and what error the profiler reports.
Deployment docsSQL dialect compatibility
Each warehouse has its own SQL dialect, function set and quoting rules, so a metric expression written for one engine may fail or return different results on another. Test the expression against the exact warehouse version, including null handling, date functions and case sensitivity. Keep a short list of expressions that were verified and the engine they were verified on.
Sampling and custom expressions
Profiling can run on a sample of rows rather than the full table, and a custom expression may not behave the same on a sample. Confirm in a test environment whether your metric is calculated on the full table or a sampled subset, and compare the result with a direct query. Document the sample setting next to every business metric so readers know what the number represents.
History retention and charting
A metric is only useful over time if each run is stored and can be charted for the period the business needs, such as a quarter or a year. Ask how long profile results are kept, whether that period is configurable, and whether custom metrics appear in the same history views as built-in metrics. Test a time range longer than your reporting cycle before you rely on it.
Moving definitions between environments
Metric definitions live in the catalog, so a change made in a test environment does not automatically reach production. Ask whether definitions can be exported, reviewed in version control and imported with the same identifiers. Confirm how a definition is matched to its table and column after import, so history does not split into a new series.
Upgrade path for existing metrics
Before you upgrade, confirm how existing custom metrics, stored results and ingestion images are handled. The 2.0 release notes list breaking changes that affect ingestion, so check whether your metric definitions and their pipelines are affected. Run the upgrade in a copy of your environment and compare the metric history before and after.
2.0 release notesWhat buyers ask before hiring help with custom profiler metrics
How much effort does a custom profiler metric setup take?
Effort depends mostly on how many metrics you define, how many warehouse dialects they must run on, and how much review each definition needs before it is trusted. A handful of metrics on one warehouse is a small, bounded task. Effort rises when the same business definition has to be written in several SQL dialects, when each metric needs a named owner and a sign-off step, and when access to the source tables is restricted and must be requested per dataset. Ask any partner to break the effort down by metric count, dialect, access model and approval steps, so you can see which factor is driving the number.
Can an internal data team set up custom profiler metrics without a partner?
Yes, a capable internal team can define custom metrics in OpenMetadata without outside help, provided it has someone who understands the warehouse, the business definitions and the OpenMetadata profiler configuration. The harder parts are rarely the SQL itself. They are agreeing on what each metric means, deciding who signs off on it, keeping definitions consistent across teams, and testing that results match a trusted reporting figure. If those responsibilities already have owners, an internal build is realistic. If they do not, a partner can help set the process as well as the configuration.
What does the work need from our side?
Plan to provide four things before work starts. First, read-only warehouse access to the tables and columns the metrics will query, through a role that you control. Second, a sample of the business definitions the metrics must reflect, written by the people who own those figures. Third, a named owner on your side who can answer definition questions and approve changes. Fourth, a test environment with a copy of representative data, so metric queries can be checked and their cost estimated before they run against production. Missing any of these usually adds rework rather than extra build time.
How long does a custom profiler metric project take?
Duration depends on scope, not on a fixed figure. The main inputs are the number of metrics, the number of tables and warehouses involved, how many definitions are already documented, and how long your access and approval processes take. A project with a few well-documented metrics on one warehouse runs on a different timeline from one that spans several warehouses and needs definitions agreed across departments. Ask for a timeline that is tied to named milestones in the written scope, including the access request and the approval step, since those are often the longest waits.
What needs ongoing attention after go-live?
Custom metrics recur as work after go-live. Someone must review metric results when they change, update SQL when source tables or column names change, and retire metrics that no longer match a business definition. Upgrades matter too: OpenMetadata releases change the profiler and the surrounding configuration, so each upgrade should include a check that custom metrics still run and return the same values. Ask whether a partner offers a retainer for this maintenance, and who in your organization owns metric changes once the build is complete.
What should a written quote for this work include?
A written quote should follow from a written scope, and it should list the metrics by name, the warehouses and dialects they run on, the tables and columns each one reads, and the access model required. It should state what is delivered, such as configuration, SQL reviewed and tested, documentation of each definition, and a handover session. It should name the client responsibilities from the previous question, the approval steps and who gives them, and what happens if a definition changes mid-project. Finally, it should separate one-time build work from any recurring support or upgrade work, so you can compare options fairly.
How DeployOpen scopes, builds and supports custom profiler metrics
DeployOpen works on custom profiler metrics as a defined piece of work inside your OpenMetadata deployment, not as a loose request. We agree what each SQL-defined metric measures, where it runs, and who owns the results before anything is built, then hand over the definitions and the evidence your data owners need to keep them running.
How we scope
- We list every business metric, the tables and columns it reads, and the owner who signs off on its meaning.
- We confirm which profiler features your OpenMetadata version supports before choosing how each metric is defined.
- Engagements are fixed-scope, so the metric list, deliverables and timeline are agreed in writing before work starts.
How we build
- We write each SQL metric against a test database first, checking results against figures your analysts already trust.
- We confirm the query cost on your warehouse, since profiler runs on large tables can be expensive if left unchecked.
- We set the profiling schedule, permissions and credentials so the metric runs with the access it needs and no more.
How we hand over
- You receive the metric definitions in version control, with the SQL, the owning team and the reason each metric exists.
- We document how to add, change or retire a custom metric, and which changes need review before they reach production.
- Your team walks through the trend views and a sample run so the people who own the data can read the results.
How we support
- Ongoing support covers upgrades, such as checking custom metrics against each new OpenMetadata release before rollout.
- Retainers can include periodic review of metric cost, runtime and results after schema changes in source tables.
- Continuous testing and fixes for metric queries are available as a retainer once the initial handover is complete.

