Multi-source case law — administrator guide
DATTA loads case law from five national origins — DataJud, STJ Open Data, STF, TST and LexML — and the decisions end up linked to the statute articles they interpret, with the origin recorded on each ruling and without duplicating the same case when it arrives from two origins.
Since 8 August 2026 these loads no longer have a screen of their own: each source became a DATTA Extract package, just like any other integration on the platform. In practice you gained what the old screen never had — a preview of the data before writing, editable transformations, an execution calendar, per-run history and one-click re-runs.
This guide covers: where the five packages live, how to trigger a load, how to replace the DataJud key, how to schedule and follow up, how to carry over the schedules that existed on the old screen, and the Atualizar contexto button, which has not changed.
The full technical view (provenance, merge keys, divergent interpretation, triage weight) is in multi-source case law — architecture.
1. Where the loads live
Under you will find the five packages, each named after its origin:
| Package | What it brings |
|---|---|
| Jurisprudência — CNJ DataJud (API Pública) | Procedural metadata from every court: class, subjects, judging body, docket movements. This is what unlocks the 2nd instance |
| Jurisprudência — STJ Dados Abertos (espelhos de acórdãos) | STJ full text and complete summaries, by judging body |
| Jurisprudência — STF (portal jurisprudencia.stf.jus.br) | Rulings, précis, binding précis and general repercussion theses |
| Jurisprudência — TST (pesquisa textual do portal) | Rulings, précis, jurisprudential orientations, normative precedents and theses of the Labour Courts |
| Jurisprudência — LexML Brasil (catálogo federado) | Federated discovery: title, authority and document address — a catalog, not full text |
Each package writes to both places at once: the ruling as a record linkable to the article, and the summary vectorized, for meaning-based search and for triage.
If you were looking for the old Jurisprudência tab (which lived under ) or the Fontes de Jurisprudência section under : both were retired. What replaced the old section is a direct shortcut to the packages — never an empty tab.
2. Triggering a load
In the package gallery, each card's menu offers:
| Action | What it does |
|---|---|
| Executar agora | Triggers the load immediately, using the package's default values |
| Abrir no ETL Designer | Opens the flow to inspect or adjust source, transformations and targets |
| Ver histórico | Lists that package's previous runs |
| Pausar / Ativar | Turns automatic firing off and on without deleting anything |
Each package declares the values that change from one load to the next — the target context, the searched term, the court, the result ceiling. They ship with a default value written into the package itself, and that default is what the run uses, both for Executar agora and for the automatic trigger.
To load with different values, open the package in the ETL Designer and change the parameter's default before running. This is also how you change what the automatic load brings every day: the default value is what it uses.
The target context is never guessed. All five packages ask for the legal context (
cpc,cdc,cpp, …) explicitly, and it is what defines where the rulings are stored and where the text is indexed. The context open on your screen has no influence on the load's destination.
What each package asks for
| Package | Besides the context |
|---|---|
| DataJud | Court (sigla, e.g. stj, tjsp, trf1, trt2); Search term (default *, which brings the court's whole collection); Subject (a fragment of the procedural subject; * discards nothing); Maximum cases (default 10,000) |
| STJ Open Data | Judging body (closed list of 10 values: corte-especial, the three sections and the six panels); Competence as YYYY-MM, or todas; Maximum rulings (default 1,000) |
| STF | Search term; Base (rulings, précis, binding précis or general repercussion); Maximum results (default 100); Article and Legislation, optional |
| TST | Search term; Type (all, ruling, précis, OJ, PN or thesis); Sorting (relevance or date); Maximum results (default 100); Article and Legislation, optional |
| LexML | Search term (use + instead of spaces); Maximum records (default 100); Article and Legislation, optional |
Why only three packages ask for an article
Not every origin accepts being queried by article, and the platform treats each one for what it is:
| Origin | How it is queried | Link to the article |
|---|---|---|
| STF, TST, LexML | Term-driven search — you choose the searched text | Born together with the ruling, when you provide article and legislation. Without both, the load enters without a link, which is the correct behavior |
| DataJud, STJ | Collection load (by court, judging body, competence) — they do not accept an article as a filter | Created at the end of the load: the platform reads the legal citation from the summary (e.g. art. 335 do CPC) and links the ruling to the article |
The outcome is the same either way: the ruling ends up linked to the article, which is what makes case law weigh on triage. The difference shows only in timing — on collection loads the link appears at the end, not during.
3. Replacing the DataJud key
The DataJud load uses the CNJ Public API, authenticated with an APIKey. That key is public: the CNJ publishes it openly, with no registration, at <https://datajud-wiki.cnj.jus.br/api-publica/acesso>. It is not a private secret, and it may rotate from time to time.
It no longer lives under . Today it belongs to the package itself:
- Open Jurisprudência — CNJ DataJud (API Pública) under and choose Abrir no ETL Designer.
- Select the source node (the first in the flow, the one querying the CNJ API).
- Replace the value of the Token / API Key field and save the flow.
The value is stored encrypted and comes back masked on read — whoever opens the flow later does not see the key. The replacement takes effect on the next run, with nothing to restart.
At install time the key is seeded automatically from the platform configuration. With the field empty the package is still registered and fails at run time with an authentication error — on purpose: one source without a key must not block the registration of the other four.
4. Scheduling
Each package ships with its own schedule, staggered through the early morning (Brasília time) so the five loads do not compete for vectorization:
| Package | When it runs |
|---|---|
| DataJud | 02:40, every day |
| LexML | 03:40, every day |
| STJ Open Data | 04:40, on the 5th of each month |
| TST | 05:40, every day |
| STF | 06:40, every day |
Under you see the full calendar — what has already run and what is scheduled — and you can adjust each package's frequency using the same vocabulary as the rest of the platform (hourly, daily, weekly, monthly, or a cron expression).
The automatic run uses the package's default values (§2). This matters mostly for the search term of the term-driven origins: changing the default term changes what the daily sweep brings. Keep it aligned with the collection the target context needs.
A pausado package does not fire automatically and remains available for manual runs.
5. Following up and diagnosing
- During the load: shows the runs in progress, with counts of rows read and written.
- Afterwards: Ver histórico on the package card lists start, end, final status and what each run wrote. It is what tells a load that failed halfway from one that never started.
- Failures show the origin's message, in Portuguese, inside the run itself — never as a bare technical error on screen.
Worth knowing when reading a result:
- A completed run does not mean "everything was vectorized". If the vectorization service answers no batch at all, the run fails with the reason written out. But if it fails only on part of the batches, the run finishes fine and the documents without vectors stay only in the service's technical log — they exist in the collection and are not found by meaning-based search. Re-running the load once the service is back fixes it.
- The subject filter (DataJud) and the type filter (TST) are applied after the read. The result ceiling counts what the origin returned, before the filter — if you asked for 100 and filtered by a rare type, you may get far fewer than 100 records written.
6. Carrying over the schedules from the old screen
If your installation already had schedules configured on the old Jurisprudência tab, they stop firing with this update: the loop that evaluated them went away together with the screen. They remain stored, with no error at all — and unnoticed, until the case law goes stale.
The transfer is a one-time task, performed by whoever operates the platform, with the scripts/migrar-agendamentos-jurisprudencia.sh utility. What it does:
- reads the active schedules and matches each origin with the corresponding package — an origin with no package is reported out loud, never silently skipped;
- writes into the package the frequency you had configured, plus the context, the article and the legislation as the parameters' default values;
- preserves the time: the screen's schedule was always in UTC, and the translation records the timezone explicitly, so the load does not start running three hours later;
- does not delete the old schedules — it leaves the cleanup to you, after you verify the result;
- can run in simulation mode, which prints the plan without writing anything, and can be repeated without duplicating anything.
After the migration, the schedule you configured wins over the package's default schedule (§4) — the utility says so in its output, because it is a behavior change that must be acknowledged.
The required access, the alternative of reading from an exported file and the final cleanup command are in the file's own header and in the technical guide.
7. Update context / Full
This flow has not changed. Each context's legislation and the curated case law that comes linked to the articles are still reviewed together. Under , each context has two buttons:
| Button | What it does | When to use it |
|---|---|---|
| Atualizar contexto | Re-checks legislation and case law resuming where it stopped | Routine; much faster on large contexts |
| Completa | Forces a complete reprocess: clears the resume points and re-ingests everything | When you suspect stale content or want to recompute the comparison from scratch |
The operation runs in the background, with a real progress bar — you can leave the page and come back without losing track. On completion the platform shows the update report:
- Diff — how many articles, items, paragraphs and rulings were added, and how much each origin contributed. The count sees everything in the context, including what the §1 packages wrote.
- Divergent interpretation — articles whose heaviest case law has low similarity to the article's text: a sign that the court reads it differently from the letter. Each entry shows the article, the similarity, the reference ruling and the court.
Automatic update: besides the manual trigger, the platform runs "Update context" for all contexts once a week (default: Monday, 03:00 UTC). The frequency and the on/off switch live in the installation configuration and must be changed there and reapplied — never through an ad-hoc adjustment in the environment. The routine is best-effort: one context being down does not bring down the others.
8. Permissions
| Action | Permission |
|---|---|
| View the packages, the calendar and the history | PIPELINE_VIEW |
| Run a load | PIPELINE_EXECUTE |
| Change the schedule, edit the flow and replace the DataJud key | PIPELINE_CREATE |
| Trigger ingestion of the curated per-article collection | JURISPRUDENCIA_INGEST |
| Atualizar contexto / Completa | CONTEXT_UPDATE |
Without the right permission the action is denied with a message in Portuguese and the event is recorded in the audit trail.
9. Worked example — STJ rulings on limitation periods
- Under , open Jurisprudência — STJ Dados Abertos in the ETL Designer.
- Adjust the default values: target context, judging body
primeira-turmaand competence2024-01. Save. - Back in the gallery, choose Executar agora. Follow it in the Job Monitor.
- Repeat with Jurisprudência — CNJ DataJud, court
stjand termprescricao tributaria. Rulings that already came in through STJ Open Data and carried the CNJ unique number are recognized and enriched, not duplicated; the rest come in as DataJud records of their own — merging the two origins depends on both publishing the same number (§11). - Run Atualizar contexto on the matching context under to recompute Divergent interpretation against the new collection.
10. Quick verification
With read access to the graph (through MCP, for instance), these queries show coverage, origin merging and divergence:
// Provenance and coverage per origin/court in a context (e.g. cpc)
MATCH (j:Jurisprudencia)
RETURN j.fonte AS origin, j.tribunal AS court, count(*) AS n
ORDER BY n DESC;
// Rulings that arrived from more than one origin
MATCH (j:Jurisprudencia) WHERE size(coalesce(j.fontes,[])) > 1
RETURN count(*) AS multiOrigin;
// Rulings that already weigh on triage (linked to an article)
MATCH (a:Artigo)-[:ARTIGO_TEM_JURISPRUDENCIA]->(j:Jurisprudencia)
RETURN count(DISTINCT j) AS linked;
// Articles flagged as divergent
MATCH (a:Artigo {entendimentoDivergente:true})
RETURN a.numero, a.driftSimilaridade, a.driftTribunal
ORDER BY a.driftSimilaridade;11. Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The DataJud load fails with an authentication error | The source node's Token / API Key field is empty or holds an old key | Update the CNJ public key following §3 |
| The DataJud load never goes past ~10,000 cases | The API's own result-window limit | Narrow it by term or subject and run more than once; do not raise the ceiling |
| The STJ load returns zero rulings for a given competence | The file read is the oldest month published for that judging body; the requested competence is not in it | Use todas to see what the file covers, or pick a competence present in it |
| The STF or TST load fails with a portal error | Anti-bot protection at the portal's edge, which only answers cleared addresses | Retry later; if it persists, the environment's access must be cleared with the portal |
| The STF load fails saying the response path does not exist | The portal changed its response envelope format | This is a configuration fix, not a credential one: correct the JSON Path field of the source node following the technical guide |
| Rulings came in but do not weigh on triage | The link to the article is missing | On term-driven origins, provide article and legislation. On collection origins the link depends on the summary citing the article — a ruling with no recognizable legal citation stays unlinked |
| One ruling shows up linked to articles of different statutes | On collection loads the link is made by the number of the cited article, without distinguishing the legislation | Expected today; use the term-driven origins when link precision matters |
| Meaning-based search does not find what was loaded | Part of the batches ended up without vectors during the load | Re-run the package once the vectorization service is back |
| The same case shows up twice, one STJ record and one DataJud record | The two origins only merge when they publish the same number; STJ rarely carries the CNJ unique number | Expected. Both records are valid: the STJ one adds the full text, the DataJud one adds the metadata |
| My old schedule stopped running | The case-law screen was retired together with the loop that evaluated it | Perform the transfer in §6 |
| Atualizar contexto changes nothing / divergence empty | Legislations without a source address are skipped; divergence requires both sides to have been processed by meaning-based search | Register the legislation's origin and make sure both sides are semantically indexed |