Spark resource extension marking a host AshArcadic.DataLayer graph resource
as a replicant CDC mirror target — declares which Postgres {schema, table} this resource mirrors.
Add it to a host graph resource:
use Ash.Resource,
domain: MyApp.Domain,
data_layer: AshArcadic.DataLayer,
extensions: [AshArcadic.Replicant]
replicant do
source_table "orders"
tenant_attribute :org_id
skip [:internal_notes]
endDiverges from the sibling ash_replicant's AshReplicant.Resource (its
resource.ex is the design template — same %Spark.Dsl.Section{} +
use Spark.Dsl.Extension idiom) in these deliberate ways:
source_tableis required, with no reflection fallback — a graph resource's ownarcade do label ... endis NOT its Postgres source table, so the mapping must be declared explicitly.source_schemadefaults to the static string"public"(no reflection).on_truncatesupports only:halt(default, fail-closed) and:mirror— the precedent's SCD2-only:closevalue is dropped (no SCD2 target-side support this slice).- Only
source_schema,source_table,tenant_attribute,skip, andon_truncateare exposed.tenant_mfa,sensitive,upsert_identity,history_*, andon_schema_changeare out of scope — sensitive classification is handled target-side by the existingarcade do sensitive ... endsection, not a replicant-section list. skiphere names source (Postgres) columns excluded from the mirror write — distinct fromarcade do skip ... end, which names target (ArcadeDB) graph attributes.