Pipelines
Override a mapping with an expression
Most columns copy straight from source to destination. Calculated columns are different: the value may be computed in the source, in the destination, or not stored anywhere. The Strategy cell in the column grid tells Kenseme how to load them, and Override expression lets you write the value yourself.
In the app: Data Model › Pipelines › your Pipeline › Table Mappings › expand a table › Strategy
Where the Strategy cell appears¶
The Strategy dropdown appears only on rows where the source or destination column is calculated (marked with the ƒ icon), or where a non-default choice is already set. Ordinary columns have no Strategy control.
When a table has calculated columns, a bar above its column grid shows the count and a N need attention badge for columns that still need an expression or have a validation warning.
The choices¶
| Choice | What the load does |
|---|---|
Auto |
The default. Kenseme decides from the column and the destination database. A calculated destination column is left for the database to compute when it supports calculated columns; otherwise the value is produced through a helper view. Everything else is copied. |
Pass through |
Copies the source value into a plain destination column. |
Target computes |
Leaves the column out of the load. The destination computes the value itself. Offered only when the destination column is calculated. |
Materialize via view |
Kenseme generates a helper view (named vw_promo_<source table>) that adds the calculated value as a real column, and the load reads from that view. |
Skip in pipeline |
Writes nothing to the column. It stays empty or computes itself. |
Override expression |
Uses your SQL expression as the column’s value. |
Changing a choice saves right away and shows Strategy updated to ….
Write an override expression¶
- Expand the table in the
Table Mappingstab. - In the calculated column’s
Strategycell, chooseOverride expression. - The
Override Expressiondialog opens. Type a single SQL expression inSQL Expression, for exampleUPPER(LastName) + ', ' + FirstName. - Click
Save.
To edit it later, click the pencil next to the Strategy dropdown. The pencil is highlighted when no expression is set yet. If you cancel the dialog before saving an expression, the strategy stays as it was.
Rules for the expression¶
- One expression only. It is placed directly into the
SELECTlist of the generated load. - Up to 4,000 characters.
- No semicolons and no comment markers (
--or/*). - No triple quotes (
"""). - Write it in the destination database’s syntax. Kenseme does not translate an override expression.
The dialog shows these messages when a rule is broken:
Expression is required.Expression cannot exceed 4000 characters.Expression must be a single SQL expression — no semicolons or comment markers.
AI check on view-based expressions¶
When a column is produced through a helper view (Materialize via view, or Auto resolving to it), Kenseme asks the AI to check the expression against the destination dialect when it generates the load. The result shows as an icon in the Strategy cell:
- A check mark —
Validated for <dialect>: the expression is valid as written. - Two arrows —
Rewritten for <dialect>: the AI supplied a corrected form, which the load uses. Hover to read it. - A warning — the expression may not be valid. Hover for the reason.
Override expressions are used as you wrote them and are not checked this way.
Tips¶
- Keep expressions short. If you need joins or several steps, build a view in the source schema and map from it instead.
- Test the expression in the destination database first if you are unsure. A mistake shows up only when the load runs.
- Changing a strategy or expression marks the table’s load procedure as out of date. Regenerate it afterwards.