AshCsvInterchange. Transformers. ValidateImportAction
(AshCsvInterchange v0.1.0)
Copy Markdown
View Source
Compile-time validation for AshCsvInterchange DSL config. For every
csv_import entity declared on the resource:
- The configured
upsert_actionis a:createaction declared on the resource withupsert? trueandupsert_identityset. - Every header input key resolves to an argument on the upsert action or an accepted attribute.
- No two header columns collide after whitespace trim and ASCII case-fold.
- Every
upsert_identitykey is an argument or an accepted attribute of the upsert action. This catches the typo case where an identity key has nowhere to land. Where the value comes from is the action author's concern. - If
import_sourceis set, its attribute exists on the resource.
Failures raise Spark.Error.DslError pointing at the offending
entity.
Summary
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.