Skip to main content
When you ingest data into DataLinks, you can include an inference pipeline that transforms your data before it is stored. The pipeline is a sequence of steps that extract structure from unstructured text, normalize column names to a target schema, validate data quality, and enrich records with geographic coordinates. Inference steps are specified in the infer.steps array of an ingestion request. Steps execute in order: the output of each step becomes the input for the next.

Step types at a glance

Steptype valuePurpose
Table extractiontableExtract structured columns from unstructured text
RowsrowsExpand a JSON array stored in a column into rows
NormalizenormalizeMap extracted column names to a target schema
ValidatevalidateCheck data quality and flag invalid rows
ReverseGeoreverseGeoAdd latitude/longitude from location names

How the pipeline works

The inference can have multiple steps which are combined by our AI. Steps execute sequentially in the order you list them. A typical pipeline follows this pattern:
You can use any combination of steps. A single step is fine. So is skipping straight to normalize if your data is already tabular but has inconsistent column names. The full request structure looks like this:
In this specific example we specify we want a table extracted from a specific column. This will extract all columns available from the text provided. You can use the helperPrompt to guide the AI system to have higher accuracy during extraction.

Step reference

Table extraction

The Table step is designed to extract a table from any text input, whether it’s free-form text such as a restaurant review, a flight log report, or a financial instrument notice. When used independently, this step may produce columns that are somewhat arbitrary and often require normalization afterward. It functions by extracting data to create new columns and appending them to the rows of the existing table.
FieldRequiredDescription
typeYesMust be "table"
deriveFromYesName of the column containing unstructured text
helperPromptNoInstructions to the LLM about what to extract and how
Pro tip: Calling an extraction with just the table step is a great way to see what kind of structured data can be generated from your unstructured data. When processing diverse inputs, the LLM will invent column names based on what it finds. Different rows may produce different names for the same concept (e.g., phone_number vs telephone). Follow table extraction with a normalize step to consolidate these into a consistent schema.

Rows

If a table is stored in JSON format within a column, you can directly transform it into a structured table. The JSON should consist of an array of objects, with each key in the objects mapped to a new column.
FieldRequiredDescription
typeYesMust be "rows"
deriveFromYesName of the column containing a JSON array
For example, if a column contains [{"name": "Alice", "age": 34}, {"name": "Bob", "age": 28}], the Rows step produces two rows with name and age columns.

Normalize

Use the Normalize step to consolidate the schema or column space. In this step, specify the columns you want to include in the final table that will be indexed into DataLinks.
FieldRequiredDescription
typeYesMust be "normalize" (or "normalise")
modeYesOne of "all-in-one", "field-by-field", or "embeddings"
targetColsYesObject mapping desired column names to descriptions
helperPromptNoDomain context to help the LLM interpret column names

Choosing a mode

The normalize step supports three different modes:
ModeHow it worksBest for
all-in-oneUses a single prompt to normalize all columns at onceGood default for most cases. Fast and effective when columns are reasonably self-explanatory.
field-by-fieldNormalizes each field individually, which can be more accurate for complex schemasComplex schemas where columns may be ambiguous. More accurate but slower.
embeddingsUses embeddings to match column names, which can be faster and more efficient for large datasetsHigh-volume ingestion with predictable, consistent source schemas. Fastest option.
The descriptions you provide in targetCols matter. They are the primary signal the LLM uses to decide which extracted column maps to which target. Be specific: "Email address" is better than "email", and "Annual salary in USD" is better than "salary".

Validate

The Validate step ensures data quality by validating the content of specified columns. It supports three validation modes:
FieldRequiredDescription
typeYesMust be "validate"
modeYesOne of "regex", "rows", or "fields"
columnsYesArray of column names to validate

Validation modes

  1. regex: Validates columns using regular expressions
  2. rows: Validates entire rows based on the specified columns
  3. fields: Validates individual fields in the specified columns
Validated rows will include a __valid field indicating whether the validation passed.

ReverseGeo

The ReverseGeo step adds geographical coordinates (latitude and longitude) based on location names in a specified column.
Note: ReverseGeo is an optional feature not enabled by default. Contact your account representative to add it to your workspace.
FieldRequiredDescription
typeYesMust be "reverseGeo"
deriveFromYesName of the column containing location names
This step will add a new column named {locationColumnName}_latlong containing the coordinates. Example output:
citycity_latlong
New York40.7128,-74.0060
London51.5074,-0.1278

Writing effective helper prompts

The helperPrompt field is available on both the table extraction and normalize steps. It is the most impactful parameter for inference quality. A good prompt gives the LLM the context it needs to make accurate decisions. Be specific about the schema you expect. Name the columns and describe their format:
Describe the source format so the LLM knows how to parse it:
Call out edge cases and transformation rules:
State what to include and exclude:

Choosing an LLM

Steps that use LLM inference (table extraction and normalize) accept optional model and provider fields to specify which model runs the step.
FieldRequiredDescription
modelNoThe model identifier
providerNoThe provider name (e.g., "openai", "ollama")
When omitted, DataLinks uses its default model. Smaller models are faster and cheaper for simple extractions; larger models handle ambiguous or complex text better.

Complete example

This example takes unstructured directory entries, extracts structured fields, normalizes the schema, and validates the results:

Saving inference definitions

When you create a dataset, you can save a data description and field definition that DataLinks uses during future ingestion calls. This avoids repeating the same configuration on every request. Set the definition at creation time via the inferDefinition field on Create new dataset, or update it later with Update infer definition.