Skip to content

Patterns Reference

Patterns are how Frank expands capability without rewriting the product. They describe source connectors, transform actions, runtime contracts, UI forms, and validation rules in structured files.

There are two pattern families:

FamilyLocationPurpose
Source patternsbackend/config/patterns/*.jsonConfigure extract/load sources and discovery forms.
Transform patternsbackend/config/transform_patterns/*/pattern.yamlConfigure reusable transform actions, params, renderers, and Python-runner packages.

Source patterns

Source patterns drive the source creation wizard and source discovery APIs.

Core fields:

FieldMeaning
idStable pattern ID such as postgres or rest_api.
nameUser-facing name.
descriptionShort explanation.
categoryUI grouping such as database, api, file, crm, finance, streaming.
complexityUI hint for setup difficulty.
extendsOptional parent pattern for inheritance.
engineairbyte or dlt.
airbyte_connector / dlt_sourceEngine-specific connector metadata.
field_definitionsRequired and optional config form fields.
config_defaultsDefault source configuration.
config_templatesReusable config shapes.
examplesExample use cases.
supported_formatsFile or payload formats.
auth_methodsSupported auth schemes.
transformation_hintsHints for later mapping and modeling.

Source pattern catalog

Installed source patterns include:

PatternCategoryEngine
postgresdatabaseAirbyte
mysqldatabaseAirbyte
mssqldatabaseAirbyte
mongodbdatabaseAirbyte
bigquerydata warehouseAirbyte
snowflakedata warehouseAirbyte
redshiftdata warehouseAirbyte
databricksdata warehouseAirbyte
salesforceCRMAirbyte
hubspotCRMAirbyte
google_adsmarketingAirbyte
google_analyticsanalyticsAirbyte
google_sheetsfileAirbyte
s3fileAirbyte
sftp_bulkfileAirbyte
rssAPIAirbyte
rest_apiAPIdlt
graphqlAPIdlt
githubAPIdlt
jiraAPIdlt
notionAPIdlt
slackAPIdlt
airtableAPIdlt
stripefinancedlt
filesystemfiledlt
archivefiledlt
kafkastreamingdlt

Field definitions

Field definitions generate UI forms and validation expectations:

json
{
  "required": {
    "host": {
      "type": "string",
      "label": "Host",
      "description": "Database host"
    },
    "password": {
      "type": "password",
      "label": "Password"
    }
  },
  "optional": {
    "ssl": {
      "type": "boolean",
      "default": true
    }
  }
}

Supported field types include string, password, number, boolean, select, JSON object, and array-style values.

Source pattern inheritance

Patterns can extend another pattern. The registry merges parent and child config:

  • Child connector config overrides parent connector config.
  • Field definitions are merged.
  • Defaults and templates are merged.
  • Child pattern metadata remains the user-facing identity.

Use inheritance for specialized API patterns that share a base REST or file configuration.

Source pattern APIs

http
GET /api/v1/patterns/discover
GET /api/v1/patterns/{pattern_id}

CLI:

bash
frankctl patterns list
frankctl patterns get postgres

Transform patterns

Transform patterns drive Quick Actions, reusable transform steps, and custom Python runner packages.

Core fields:

FieldMeaning
idStable transform pattern ID.
versionPattern version.
nameUser-facing name.
descriptionWhat the pattern does.
categoryUI grouping.
complexitySetup complexity.
params_schemaJSON Schema for pattern params.
input_contractRequired input shape.
output_contractOutput shape.
supported_runtimesRuntime values such as trino_sql or python_runner.
ui_configUI form hints.
example_paramsExample param object.
is_active / is_deprecatedLifecycle controls.

Transform pattern catalog

Installed transform patterns include:

PatternCategoryPurpose
select_renameprojectionSelect and rename columns.
filterfilteringFilter rows with a SQL expression.
dedupededuplicationRemove duplicate records.
left_joinjoiningLeft join tables.
inner_joinjoiningInner join tables.
lookup_joinjoiningLookup enrichment.
aggregateaggregationGroup by and aggregate.
windowanalyticsWindow functions.
validate_regexvalidationValidate text fields by regex.
validate_enumvalidationValidate categorical fields.
flag_anomalyvalidationZ-score anomaly flagging.
unit_convertconversionUnit conversion.
currency_convertconversionCurrency conversion.
timezone_convertconversionTimezone conversion.
upsertdimensionsInsert/update materialization.
scd_type1dimensionsType 1 dimension overwrite.
scd_mergedimensionsType 2 slowly changing dimension merge.
geo_parse_wktgeospatialParse WKT geometry.
geo_containsgeospatialPoint-in-polygon checks.
geo_distancegeospatialDistance calculations.
geo_nearestgeospatialNearest-neighbor matching.
h3_enrichgeospatialH3 cell enrichment.
h3_aggregategeospatialH3 aggregation.
h3_spatial_joingeospatialH3 spatial joins.
fx_rate_ingestutilitiesPython-runner FX rate ingestion.
python_echotestingPython-runner test pattern.

Transform pattern APIs

http
GET  /api/v1/transform-patterns
GET  /api/v1/transform-patterns/categories
GET  /api/v1/transform-patterns/{pattern_id}
POST /api/v1/transform-patterns/{pattern_id}/validate
POST /api/v1/transform-patterns/{pattern_id}/preview
POST /api/v1/transform-patterns/sync

CLI:

bash
frankctl patterns validate-params filter -f params.yaml

Python-runner pattern structure

Python-runner patterns are authored as package directories:

text
my-pattern/
  pattern.yaml
  main.py
  requirements.txt
  Dockerfile
  tests/
    sample_config.json
    test_transform.py
  README.md

Use the Python frank CLI:

bash
frank init my-pattern --template python
frank validate my-pattern
frank test my-pattern --config my-pattern/tests/sample_config.json
frank build my-pattern --tag my-pattern:v1

The runtime code should use SDK primitives:

  • FrankContext.from_env()
  • emit_log, emit_metric, emit_lineage, emit_progress
  • FrankResult.success(...)
  • result.write_to_stdout()

External pattern registration

Publishing flows can register pattern changes with Frank:

bash
PATTERN_WEBHOOK_SECRET=... frankctl patterns register -f webhook-payload.json

The CLI signs the payload, and the API records or reconciles the pattern lifecycle. This is the path for generated or externally maintained transform packages to become available in the product.

Frank is built by aiaiai-pt.