ACID transactions
ACID transactions are the four guarantees that keep database changes correct: atomicity, consistency, isolation, and durability. They make s...
Read definitionA mapping rule is the part of a source-to-target mapping that says how a value gets from a source field to a target field: a direct copy, a type change, a lookup against a code set, a default, or a value that depends on a condition. It is the reviewable version of what your ETL or dbt code actually does.
A mapping rule is one line in a source-to-target mapping: it states how a single value gets from a source field to a target field. That can be a plain copy, or it can reshape the value on the way across.
These rules live in a source-to-target mapping document, often called an STTM, and in the tools that run it: an ETL or ELT job, a dbt model, an SSIS package, or an Azure Data Factory copy activity. The rule is the readable version of one decision, something a business owner can check; the SQL or Power Query underneath just runs it.
Most mapping rules take one of a few shapes:
Direct move. The value passes through unchanged under a new name: customer_id becomes customer_number.
Type conversion. A text field holding 31/12/2025 in day-month-year order becomes a real DATE. Azure Data Factory does this through an interim type.
Code-set lookup. A source code is translated through a code set: status A, I, and B become Active, Inactive, and Blocked.
Default. When the source is empty, the rule writes a fixed value, not a blank.
Conditional route. If country is BE, use the enterprise number, otherwise the VAT number.
Reshaping a value this way is a data transformation; a mapping rule is the smallest documented unit of one.
A legacy system stores country in a field called land_code using its own short codes: B for Belgium, F for France, D for Germany. The warehouse wants a country_iso2 column in ISO 3166-1 alpha-2 form: BE, FR, DE. The rule is a lookup against a small code set, kept in dbt as a seed, a version-controlled CSV:
land_code,country_iso2
B,BE
NL,NL
F,FR
D,DEWhat teams forget is the value not in the table: a typo, or a country nobody planned for. A good mapping rule states the fallback: unmatched codes get written as ZZ, a slot ISO 3166 keeps aside for user-assigned use, and the row is flagged so data lineage and data quality checks can catch it. Without it, unknown countries land blank or fail the load. SSIS builds the same choice into its no-match and error outputs.
Three rules sit side by side in the same mapping spec and get mixed up. A mapping rule moves and shapes a value that already exists in a source field. A derivation rule computes a new value that has no single source, like net_revenue = gross - discount - vat or an age from a birth date. A validation rule judges a value and returns a verdict: this VAT number matches the pattern, this country_iso2 is a known code, this row passes or fails.
Put plainly: mapping decides where a value goes and what shape it takes, derivation decides what a new value is, and validation decides whether a value is allowed through. A field can be mapped and then validated, while a derived field is computed rather than mapped at all.
ACID transactions are the four guarantees that keep database changes correct: atomicity, consistency, isolation, and durability. They make s...
Read definitionAnomaly detection automatically flags data points, events, or patterns that do not fit normal behaviour. It can catch odd invoices, machine ...
Read definitionAnonymisation makes data no longer reasonably linkable to a person. Pseudonymisation replaces identifiers with codes but keeps a route back ...
Read definitionApache Airflow is an open-source workflow orchestrator for batch-oriented data pipelines. You define workflows as Python code, connect tasks...
Read definitionAn API, or Application Programming Interface, is a contract that lets software talk to other software. In a data context, APIs are how conne...
Read definition
Ten practical steps to automate your business processes without AI hype. Start small, fix the process first, use the tools you already own, ...
Find the automation opportunities in your business that are actually worth building. A five-question test, the hotspots we keep seeing, and ...