Best Practices¶
Status: Available in ETLantic 0.21.0. Adopter-facing habits for safe, inspectable pipelines. Prefer this over scattered “best practices” asides.
Authoring¶
- Use public imports:
etlantic,etlantic.dataframe,.sql,.spark,.orchestration,.viz,.secrets,.testing. - Prefer
Extract/Loadvocabulary—not legacy Source/Sink names. - Keep transformations as contracts (
Transformation+ ports) with separate@implementation(...)or@portablebodies. - Validate before plan/compile/run:
etlantic validate TARGET --format json.
Profiles and trust¶
- Use named profiles (
development/test/ production JSON). Prefer an explicit--profilein CI. - Production profiles require a non-empty
plugin_allowlistwith exact pins. - Set
security_modeexplicitly (development|test|production). - Pin matching minors:
etlantic==0.21.0withetlantic-polars==0.21.0, etc.
Secrets and artifacts¶
- Plans and reports must contain secret references, never resolved values.
- Resolve secrets at runtime from env, mounted files, or
etlantic-keyring. - Schema history stores fingerprints/metadata only—never source rows.
- Treat
.etlantic/reports/as operational evidence, not a compliance SoR.
CLI workflow¶
etlantic doctor --profile development
etlantic validate TARGET --profile development --format json
etlantic plan TARGET --profile development --format json
etlantic run TARGET --profile development # durable assets
etlantic validate TARGET --format sarif # CI
Start from etlantic init for JSON-backed assets so CLI run works without
memory seeding. Use in-memory demos only inside one Python process.
CI¶
- Fail the build on validate errors (JSON or SARIF).
- Re-plan after profile or plugin changes; store plan fingerprints when useful.
- Compile Airflow only from a valid plan (
etlantic-airflow).
Engines¶
- Prove one engine path under validate/plan before combining engines.
- Keep a native
@implementation(...)for portable profiles outside the advertised claim set, or useportable_transform_policy="native".