AI Document Data Extraction: Parse PDFs and Web Pages into Structured JSON with OpenAI
Turn any PDF, web page, or text document into structured JSON with OpenAI GPT-4o, then store the results in PostgreSQL and Slack.
Detect Weaviate autoschema datatype drift and repair it behind approval with schema and filtered-query verification.
An undeclared Weaviate class can accept a successful batch while auto-schema stores a date as text. The retrieval pipeline then reports ingestion success but date filters return no objects. This flow protects the existing class and writes only to a new versioned class after approval.
| Guard | What it stops |
|---|---|
| Live schema diff | A count-only canary passing a wrongly typed class |
| Dry-run and auto-remediate gates | An accidental class creation or re-ingestion |
| Pause plus post-pause schema read | Acting on a stale approval snapshot |
| SchemaCreate under a versioned name | Mutating or deleting the existing class |
| Schema read-back and filtered Query | Treating a successful write as proof of a usable schema |
| Probe Delete | Leaving verification data in the repaired class |
This blueprint was created by zkasuran.
read_live_schema (io.kestra.plugin.core.http.Request) reads /v1/schema/<class> from the target Weaviate instance. schema_diff records the datatype, tokenization, index flags and vectorizer values from that live response.detect_drift compares the live response with the committed probe contract: title and tenant are tokenized text, eventDate is filterable date plus the class vectorizer is none.auto_remediate=true and dry_run=false; the disabled schedule always forces those safe values.approve_schema_repair (io.kestra.plugin.core.flow.Pause) presents the diff for approval. reread_before_write reads the old class again and stale_plan_gate refuses the write if its bytes changed while approval was pending.create_versioned_schema (io.kestra.plugin.weaviate.SchemaCreate) creates the typed class with one data type per field and vectorizer: NONE, and reingest_probe (io.kestra.plugin.weaviate.BatchCreate) writes the bounded probe batch into it.read_repaired_schema verifies every committed property setting. filtered_probe_query (io.kestra.plugin.weaviate.Query) uses searchType: FETCH_OBJECTS with two structured filters (eventDate GREATER_THAN_EQUAL a DATE value and tenant EQUAL the probe tenant, combined with AND) and must return the probe. The run fails if either check misses plus the probe is deleted on both success and failed verification paths.errors block sends a Slack alert for an API, schema or verification failure.SchemaCreate plus BatchCreate repair path, with schema read-back and a date-range/tenant query as the recovery proof.Platform and data teams operating Weaviate ingestion pipelines where a successful batch response must also mean that filtering and retrieval semantics remain usable.
Weaviate stores schema and data but does not coordinate a reviewable drift plan, an approval pause, a versioned repair plus an independent query proof. Kestra provides those steps as an auditable execution with safe trigger inputs and an error notification path.
Tested on Kestra 2.0.5 with Weaviate 1.25.0. The test fixture reproduces autoschema by batch-inserting eventDate=17/10/2026 into an undeclared class, which creates eventDate as text; a filtered date-range query returns no probe. Remediation re-ingests the same probe with the normalized ISO value 2026-10-17T12:00:00Z into the typed versioned class. Counts and query results are read from Weaviate's REST and GraphQL APIs. The flow was migrated to the structured Query of plugin-weaviate 2.0 and its remediation path re-run on Weaviate 1.39.
| Case | Execution | Result |
|---|---|---|
| Healthy control | 2qMzrsehOYkQ0ftEvGEIvU |
Healthy class spared |
| Degraded dry run | 2zLjqIm5iKvDbRhmwirapt |
Drift reported with no write |
| Declined approval | 3wEyoJXmlA9HcPNBpVeMsw |
No class or object write |
| Remediation | 19D2peSAghuloZUI6riDZn |
Typed class and filtered probe verified |
| Repeat | 5SEIitSJM09aTpUxEsVBEY |
Existing version reconciled |
| Ineffective write | 4EaYZjvU7dvEFL9F0Ezjgg |
Failed schema verification |
| Race during approval | 3ZAkgXzwWsJN0jx8Tergor |
Stale plan refused |
50051 by default; set grpcHost and grpcPort to override)./v1/schema, create a class, batch-create objects, query objects and delete the probe objects.WEAVIATE_API_KEY: bearer credential when anonymous=false.SLACK_WEBHOOK_URL: incoming webhook for findings and failures.| Input | Purpose |
|---|---|
weaviate_url |
Weaviate endpoint |
anonymous |
Whether to omit the API key |
degraded_class |
Class whose live schema is diffed |
probe_title, probe_date, probe_tenant |
Bounded re-ingestion and verification values |
dry_run |
Report only when true |
auto_remediate |
Arm the approval and write path |
anonymous=true for a local fixture when appropriate.degraded_class so autoschema creates the class, then run with the defaults to inspect the diff.auto_remediate=true and dry_run=false, approve the displayed diff plus inspect the schema read-back and filtered query.SchemaCreate fields and both schema diff expressions before enabling the schedule.BatchCreate when the original class contains more than the canary batch.Limits: SchemaCreate exposes property datatypes and the vectorizer but not arbitrary Weaviate module configuration. This blueprint therefore commits vectorizer: NONE and verifies the server defaults for tokenization and index flags; use a dedicated schema-management plugin when a different vectorizer or non-default index setting is required. It repairs into a versioned class and proves the supplied probe batch, not a full historical backfill.