Skip to main content

Change a context stream's manifest

This page shows you how to change what Prism knows about one of your context streams. You will learn four jobs:

  • Add a field. For example, a column that says which group owns each project.
  • Add other names for a thing. For example, so that "developers" and "engineers" find the same people.
  • Add a GitHub stream. For example, GitHub Actions runs.
  • Say which counts can only be low. For example, deployments run.

Each job ends with a check, so you know it worked. Each job also says how to undo it.

Words on this page​

A context stream is one kind of data Prism can answer questions about.

A manifest is the text that describes a context stream. It says where the data is, which columns it has, and what each column means. Prism's assistant reads it before it answers a question.

A field is one column in the manifest. For example, project_name.

A description is the sentence that says what a field means. The assistant reads it.

Before you start​

You must be a Prism admin. If you can see Admin in Prism's menu, you are one.

Save keeps a context stream on when Test passes. When you save a change to a context stream that is switched on, Prism runs Test on your changed text first. If it passes, the context stream stays on:

  • A change to what readers are told, such as a description, takes effect at once.
  • A change to what Prism copies, such as a new column, waits for the next copy. Until that copy finishes, people's questions are answered from the old manifest. Then Prism switches to your change. If that copy fails, Prism keeps the old manifest, keeps the context stream on, and says on its Overview which copy failed.

If Test does not pass, the save switches the context stream off until you switch it on again, and says which check failed. While it is off, nobody can ask about it. Pick a quiet time for a change you have not tested, and tell people first if they rely on it.

You can change some manifests, but not others.

  • You can change a context stream you added yourself from a tile. Its name is one you chose, like resource_plan or ticket_copy.
  • You cannot change the ones named github, gitlab or jira. Prism ships these, and every upgrade replaces them. If you try, Prism refuses and says so. To change one of them, ask your Prism contact. The change then arrives with the next upgrade.

Find the manifest​

  1. Open Prism.
  2. Click Admin.
  3. Click Context streams.
  4. Click the name of the context stream you want to change.
  5. Click the Manifest tab.

You now see the manifest in a text box.

Go back to an earlier version​

Prism keeps every version of a manifest, including changes made somewhere else, such as approving a proposal in Stream setup. To go back to one:

  1. Under the text box, click Saved versions. The newest is at the top, marked now. Each line says who saved it, when, and how.
  2. Click Compare with now on the version you want. Lines that start with - go when you revert. Lines that start with + come back.
  3. Click Revert to this. Revert is a save of that version. Prism checks it the way it checks a save, refuses it for the same reasons, and lists what it does the same way. If it would switch the context stream off or clear marked questions, Prism says so and waits for Revert anyway.

Revert does not change the stream's name, its parameters, its credential, or whether it is your organization's directory of people. Deleting a context stream deletes its saved versions too.

The buttons you will use​

ButtonWhereWhat it does
TestManifest tabChecks your changed text, and runs a copied stream's SELECT without reading any rows. It changes nothing.
SaveManifest tabKeeps your change. It runs Test first. If Test passes, the context stream stays on; if not, Save switches it off. It says which before it does.
DiscardManifest tabThrows away your change, before you save.
Approve, then Enablethe context stream's pageSwitch it back on after a save that switched it off.
Withdraw the waiting changethe context stream's pageThrows away a saved change that is waiting for the next copy. The context stream keeps the manifest it has.

How the manifest text works​

The text is written in YAML. YAML is plain text with a few rules.

  • Spaces at the start of a line matter. They show which lines belong together. Use the space bar, never the Tab key.
  • A dash and a space (- ) start a new item in a list.
  • The order of lines inside one item does not matter. Prism may show them in an order that looks odd, such as sql: before name:. That is normal.

Fields are in a list under a line that says fields:. In the text box it looks like this:

fields:
- sql: '"PROJECT_NAME"'
name: project_name
type: string
description: The name of the project.

Notice two things:

  1. The dash is straight under the f of fields:.
  2. The other lines of the item start two spaces further in, straight under the s of sql:.

You will add new items straight after the fields: line. Then you never have to find the end of the list.

Two rules for any text you type​

  • Never type a colon followed by a space (: ) inside a description. YAML reads it as a new line of the manifest. Write "Also called X" or "Also called X and Y", without a colon.
  • Never start a description with a quote mark (' or ").
  • Start a description with a letter, and never type # in it.

A field inside a list​

Some fields hold a list: a merge request's approvers, a pull request's commits. In a GraphQL API the list is the nodes under the field. A column whose from goes through a list with a plain name reads nothing:

from: approvedBy.nodes.username # refused: reads nothing

Prism refuses this when you save, and names the list. Write one of these instead:

  • approvedBy.nodes.0.username for the first one only.
  • For one row per approver, a child stream: a stream with parent: naming the stream it reads from and records: {path: [approvedBy, nodes]}, whose columns read from each approver. The shipped GitHub manifest's pr_reviews stream is the example to copy.

The Test button also finds a list that is not a GraphQL nodes: it says which column reads through a list on the records it looked at.

Job 1: Add a field​

The steps are different for the two ways Prism reads your data. Find the line that starts with kind:. Use Ctrl+F on Windows or Cmd+F on a Mac, and type kind:.

  • kind: query-through means Prism reads your data where it lives, every time someone asks. Do Job 1a.
  • kind: snapshot means Prism keeps a copy, taken on a schedule. Do Job 1b.
  • Anything else: this page does not cover adding a field to it. Ask your technical team.

Job 1a: Add a field when Prism reads in place (kind: query-through)​

In this example, your database team has added a column called PORTFOLIO to the view. It says which business portfolio owns each project. You want people to ask "how many projects does each portfolio own?"

Step 1. Make sure the column exists. Ask your database team for the exact column name, with its capital letters. In this example it is PORTFOLIO.

Step 2. Note the newest version under Saved versions, so you know which one to go back to.

Step 3. Find the list of fields. Press Ctrl+F (Windows) or Cmd+F (Mac) and type fields:. Stop at the first one.

Step 4. Add the new field. Click at the very end of the fields: line. Press Enter. Type these four lines. Put the dash straight under the f of fields:, and line up the other three lines under the n of name:.

- name: portfolio
type: string
sql: '"PORTFOLIO"'
description: The business portfolio that owns this project. Also called the owning group or the line of business.

Copy the quote marks exactly. In '"PORTFOLIO"' there is a single quote, a double quote, the column name, a double quote, and a single quote.

When you finish, the top of the list looks like this. Your new field is first, and the field that was first is now second:

fields:
- name: portfolio
type: string
sql: '"PORTFOLIO"'
description: The business portfolio that owns this project. Also called the owning group or the line of business.
- sql: '"ROW_KEY"'
name: row_key

Step 5. Click Test. Wait until it finishes.

  • A red message instead of a list means the text has a mistake. It is usually the number of spaces at the start of a line, or a missing quote mark. Fix it and click Test again.
  • It worked if the lines validate, explain and execute each show ✓. Ignore the fetch line.
  • A ✗ means a check failed. Read the message under it. The most common cause is a column name spelled differently from the view. Fix it and click Test again.
  • A – next to explain or execute, with no ✗ above it, means Prism could not check against your data. Do not save yet. Ask your technical team whether Prism can reach the database.
  • A select line appears for a context stream Prism copies from a Postgres, Oracle or Snowflake source. Prism runs each stream's SELECT from your changed text, asking for no rows, in the source's own session, and shows one line per stream: ran, failed or unavailable. A failed line names each declared column the SELECT does not return, or the database's error. Columns the SELECT returns that the manifest does not declare are counted, not named. Fix the sql: or the from: and click Test again. A placeholder such as {{ window.end }} is sent as a value. A stream that pages on a key also gets the first copy's checks of that key. A stream with mode: keyset also gets the first copy's read of its largest cursor value. Test sends that read asking for no rows. paging keys not checked means Test did not finish that check, so click Test again or make the view faster. A failed line gives the first copy's reason. To check a collation, Postgres and Oracle read one row of the SELECT. A ran line does not check for a key that is empty on some row. The first copy still checks that.

Step 6. Click Save. A ⚠ message says what the save will do: how many marked questions on the Verification tab lose their verdicts, and whether the context stream stays on. It stays on if it is on now and Test passes on your changed text. Under it is a list of everything the save does, grouped under headings such as What is copied and What a restricted viewer sees. New SQL is quoted exactly as it will run and marked ⚠. Read it, then click Save anyway to keep your change, or Cancel to keep the stream as it is. Test shows the same line and list under its checks. If the save would do more or something different by the time you click (a question marked meanwhile, say), nothing is saved and the message says what the save would now do: click Save again, or the button under the message when there is one. If Prism cannot work out what the save does, nothing is saved either. After the save a message appears. It says whether the context stream stayed on. If it was switched off, the message includes The row is now probed · enabled: false, and it starts with the Test check that did not pass.

Step 7. If the save switched it off, switch it back on. Go to the context stream's page, the part above the tabs. Click Approve. Then click Enable. If the save kept it on, skip this step.

If you see Test but no Approve, click that Test first. It checks that Prism can still reach your data. Then click Approve, then Enable.

Check that it worked. Ask Prism:

How many projects does each portfolio own?

It worked if you get one number for each portfolio. Ask your database team to check one number against the view.

Undo it. Open the Manifest tab. Revert to the version before your change (see "Go back to an earlier version" above). Then do Step 7 again. Then see "After a save, check the Verification tab" below: your old marks there do not come back.

Job 1b: Add a field when Prism keeps a copy (kind: snapshot)​

When Prism keeps a copy, the new column must be added in three places. Missing one is the most common mistake. Test does not check any of the three. So check them yourself, in Step 5.

In this example, you want a column called priority from a view of tickets.

Step 1. Note the newest version under Saved versions, so you know which one to go back to.

Step 2. Add the column to the query. Press Ctrl+F (Windows) or Cmd+F (Mac) and type sql:. Find the one under query:. It starts sql: "SELECT. It may look strange, with \n and \ in it, like this:

sql: "SELECT ticket_number, state, opened_at, resolved_at,\n assignee_employee_id,\
\ assignment_group\n FROM service_desk_tickets_v"

The \n marks where a new line was. Do not try to edit inside it. Instead:

  1. Read the query. Write down its column names and the name after FROM.
  2. Delete the sql: line, and every line under it that starts further in.
  3. In their place, type one new line. Start it with the same spaces the old sql: line had. Write the whole query on that one line, with your column added before FROM:
sql: SELECT ticket_number, state, opened_at, resolved_at, assignee_employee_id, assignment_group, priority FROM service_desk_tickets_v

If your query has a colon followed by a space, or a #, stop. Ask your technical team to make this change.

Write the column name in small letters. If your database team spelled it with capital letters, ask them how to write it here.

Step 3. Add the column to the copy. Find the line columns: (use Ctrl+F or Cmd+F). Click at the very end of that line. Press Enter. Type these three lines. Put the dash straight under the c of columns:.

- name: priority
from: priority
type: string

from: must be the column name you added to the SELECT.

Step 4. Add the field to the model. Find the first fields: line. Add this the same way as Job 1a Step 4:

- name: priority
type: string
description: How urgent the ticket is, as the ticket system sets it. Also called severity or urgency.

Step 5. Check all three places. Press Ctrl+F or Cmd+F and type priority. You must find it in the sql: line, under columns:, and under fields:.

Step 6. Click Test. For this kind, only the validate line is checked. It worked if validate shows ✓. Then do Steps 6 and 7 of Job 1a.

Check that it worked. If the context stream was on and Test passed, it stays on, and your change waits for the next copy. The context stream's page says so, above its tabs. Until that copy finishes, people's questions are answered from the manifest it had before. When the copy finishes, Prism switches to your change within about a minute. If the copy fails, Prism keeps the manifest it had, keeps the context stream on, and says which copy failed. Open the Runs tab to see why, fix the manifest and save again. You can save one change at a time: while a change waits, Save is refused. To drop a waiting change, click Withdraw the waiting change.

Prism fills the new column the next time it takes a copy. To have it copy sooner than its schedule, open the source on Admin → Context streams and click Copy now: the copy starts within about a minute (ingest.engine.copyNow.minutes), or, if a copy of the same source is already running, when that one finishes. With ingest.engine.copyNow.enabled off, the next ingest tick copies it instead: ticks start every 15 minutes by default, and each waits for a running one to finish. A file source has no Copy now: it is read when its file changes, so upload the file again to have it read. To see when the copy runs, open What Prism is pulling at /ingest-activity. After the next copy, ask Prism:

How many tickets are there for each priority?

It worked if you get a number for each priority. Copies Prism took before your change have this field empty. So a question about an earlier date shows no priority for that date. That is expected.

If every ticket shows no priority, one of the three places is wrong. Do Step 5 again.

Undo it. Do the undo from Job 1a. The empty column stays in Prism's copy.

Job 2: Add other names for a thing (synonyms)​

People use different words for the same thing. One person says "engineers". Another says "developers". A third says "staff".

Prism's assistant reads each field's description, and each dataset's description. If you write the other names there, it uses them. You can list as many as you like.

Where to write them​

  • For a column, write them in the field's description:.
  • For a whole set of rows, write them in the dataset's ai_context:. A dataset is one set of rows, such as people or tickets. Its ai_context: is under the dataset, after its fields.

Some fields have both an ai_context: and a description:. Then write the other names in the ai_context:. The assistant trusts ai_context: more.

Put the most important names in the first sentence of a dataset's ai_context:. When the assistant chooses where to look, it sees only that first sentence.

Write it like this​

Use the words Also called, then a list.

A weak description:

description: Employee.

A good description:

description: A person who works for the organization. Also called an employee, a staff member, an engineer, a developer or a team member.

Do not write these​

  • Instructions to the assistant, such as "always answer in a table". Say what the data means, not what to do with it.
  • Passwords, keys, or server addresses. People who can see the manifest could see them.
  • A word that means something else here. If "team" in your organization means a department, do not list it as another name for a person.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find the field or the dataset.
  3. Find its description: or ai_context: line. Read what it says. The text may carry on over the next lines, which start further in.
  4. Replace it. Do not edit inside it. Delete that line, and every line under it that starts further in. Then type a new line in its place, with the same spaces at the start. Write the old meaning and your new names on that one line. It can be as long as you like. Follow "Two rules for any text you type".
  5. If the field has no description: line, add one. Click at the end of its name: line, press Enter, and type description:, a space, and your text. Line it up under the n of name:.
  6. Click Test, then Save. If the save switched it off, switch it back on. These are Steps 5 to 7 of Job 1a.

If the context stream is your organization's directory of people, read "Save shows Save anyway" below before you click Save.

Check that it worked​

Ask the same question twice, once with each word. For example:

How many people report to Ada Lovelace?
How many engineers report to Ada Lovelace?

It worked if both answers give the same number. If the second answer says it does not know what an engineer is, the assistant did not find the word. Check that you wrote it in the right place, and that the context stream is switched on.

Do this check before your change too. Then you know the change is what fixed it.

Undo it. Do the undo from Job 1a.

Job 3: Add a GitHub stream​

You cannot add a stream to the shipped github context stream yourself. It is one of the shipped ones. See "Before you start".

There are two ways to get a new kind of GitHub data.

1. Use a tile, if there is one. Some GitHub data comes as its own tile. For example, GitHub Actions runs. Add GitHub Actions runs walks you through it. Look on the shelf first: Add a context stream from the shelf.

2. Ask your Prism contact. Tell them which GitHub data you want, and the question you want to ask about it. If it can go into the shipped github context stream, it arrives with an upgrade. You do not need to do anything when it arrives. Prism starts reading it on its own.

Check that it worked. Ask a question about the new data, for example:

How many commits were made per day over the last 14 days?

Then compare one day with GitHub. Add GitHub Actions runs shows how to compare for Actions.

Job 4: Say which counts can only be low​

When a context stream has not been read in full (its ingest is behind, or a day could not be fetched), an answer says so beside its figures. It calls a count a floor, a figure that can only be too low, only where the manifest says the count is one. Only you know your data, so the manifest decides.

Write counts: event on a count when the only way it can be wrong is that Prism has not read everything yet: things that happened and stay happened, such as deployments run or orders placed. Leave it out on a count of things in a state they can leave in the ordinary course of work, such as open tickets, resolved tickets (a ticket can be reopened) or failed runs (a run can be re-run). Without it, an answer does not call the count a floor. That says less, and it is never wrong. Even with it, an answer that filters by anything, or groups by anything other than the count's own date, does not call the count a floor. A figure for the people under a leader is a minimum for the people the directory names today. Write counts: event only where none of the people a row can be counted under can change after the event: a row counted under its author, for example, and not one counted under its assignee.

metrics:
deployments:
type: count
counts: event

counts goes only on a type: count or type: count_distinct metric. On any other metric, Test says what is wrong and Save refuses it.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find the metric under metrics:. Click at the end of its type: line, press Enter, and type counts: event. Line it up under the t of type:.
  3. Click Test, then Save. If the save switched it off, switch it back on. These are Steps 5 to 7 of Job 1a.

Check that it worked​

Ask for that count over a period that starts before the context stream's earliest data, without breaking it down or filtering it by anything. For example, if the context stream holds data from 2024 onwards:

How many deployments ran since 2015?

It worked if the answer calls the count a floor. An answer over a period the context stream holds in full has nothing to call a floor. A breakdown by anything other than the count's own date, and any filter, takes the floor off, even after this change.

Undo it. Delete the counts: event line and save. If the save switched the context stream off, switch it back on.

Before you roll back to an earlier release, delete every counts: line in the manifest of each context stream you registered from a recipe, then save. A context stream registered after this release from a recipe that declares counts carries those lines too, though you never typed them. A release from before counts existed does not recognise it, cannot read the manifest, and stops answering from the context stream.

Job 5: Say whose row it is​

Some context streams name several people on one row: an incident's assignee and the person who opened it, or a resource plan's worker and the leaders above them. When a question is about a group of people, such as "everyone who reports to Dana", or your default scope applies, Prism has to know which of those columns to match the people on. With two or more columns that name people by the same kind of identifier, it can't choose, so it asks the question to name one, and a default scope isn't applied to the stream.

subject says which column the row belongs to. A question that doesn't name a column is matched on it, and a default scope is applied through it.

Name one column that carries identity:. On a dataset with subject, every field carrying identity: must read one column: no sql:, or an sql: that is only a column's name, such as '"WORKDAY_ID"'.

datasets:
- name: tickets
source: postgres_snapshot_tickets
subject: [assignee_id]

If the name in subject is not a field of the dataset carrying identity:, or another field carrying identity: computes its value with sql:, Test says what is wrong and Save refuses it.

With restricted viewers on, adding subject stops them being answered from that context stream in this release. Without it, a restricted viewer is answered under the rule described in Which records a restricted viewer is answered from; to say there which person a record is about, declare a relationship to a person (relationships: with to: person) rather than subject. With subject, the dataset is left out of what their agent is shown, and a question naming it is refused exactly as one naming a dataset, or a stream, that doesn't exist. People who aren't restricted are answered as before, matched on the subject.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find the dataset under datasets:. Click at the end of its source: line, press Enter, and type subject: [<column>], with the column's name in place of <column>. Line it up under the s of source:.
  3. Click Test, then Save. If the save switched it off, switch it back on. These are Steps 5 to 7 of Job 1a.

Check that it worked​

Ask a question about a group of people from the stream, such as "How many tickets are assigned to the people who report to Dana?". It worked if the answer says which column it matched the people on, and that column is the subject.

Undo it. Delete the subject: line and save. If the save switched the context stream off, switch it back on.

Before you roll back to an earlier release, delete every subject: line you added, then save, approve and enable the context stream. A release from before subject existed does not recognise it, cannot read the manifest, and stops answering from the context stream.

When the records are about no person: subject: none​

Some context streams count things that belong to a team, a queue or a service rather than to a person: incidents by assignment group, a service's outages. A person's column may still be on the row, such as who the incident was assigned to, but a question about a group of people asked of these records would be matched on whichever column happens to name somebody, and two such answers can disagree with each other.

subject: none says so:

datasets:
- name: tickets
source: postgres_snapshot_tickets
subject: none

Then, on that dataset:

  • your default scope is not applied, and every answer says that it was not applied;
  • a question is refused, and the refusal says why, when it names a group of people (such as "everyone who reports to Dana"), breaks figures down by a field of your organizational directory (such as job title) or by the organization of a leader's direct reports, or asks who has records and who has none;
  • the dataset's own columns stay as they were: you can still filter and break figures down by them, including the columns that name people.

Test refuses subject: none on a dataset whose rows are people: one that an identity_links entry reads people from (via:), or one with a relationship from one of its columns to a person (to: person). Delete one of the two.

Restricted viewers are answered from the stream under the rule described in Which records a restricted viewer is answered from. The questions above are refused to them too. Your default scope is not applied to them on this stream either, as on any stream no group of people can be matched on, and their answers say so. Nor do their answers say how many people are in their line, or offer that number as the denominator for a share: these records are about no person, so it is no denominator for them.

Add it, check it and undo it as in the steps above, typing subject: none in place of subject: [<column>]. Before you roll back to an earlier release, delete it as you would any subject: line.

Some context streams hold only links between records of two other streams: a change number and the incident it caused, with no person on the row. A restricted viewer can't be answered from such a stream on its own, because nothing on the row says whose it is.

A relationship under relationships: says that a field holds the key of a record in another dataset. Write one for each side of the link, with to: naming the other dataset and its key field, and no via::

relationships:
- {name: link_change, from: change_caused_incident.change_number,
to: changes.number, cardinality: many-to-one}
- {name: link_incident, from: change_caused_incident.incident_number,
to: incidents.number, cardinality: many-to-one}

Prism uses only the relationships you write here. Two fields that share a name are not related until a relationship says so. Both ends must be fields of two different datasets, of the same type. Neither end may carry identity:: to relate a column that holds a person, write to: person with via:, as before.

to: must be the whole key of its dataset: the one field in its primary_key, not counting as_of, or a field the dataset lists under unique_keys. A dataset with neither can't be a to:. A key made of two columns, such as a repository and a number, can't be related yet: Test says so and Save refuses it, because a number alone would match a record in every repository that has one.

When the number a link carries is not the dataset's primary_key, list it under unique_keys on that dataset, after primary_key:

primary_key: [sys_id, as_of]
unique_keys: [[number]]

Prism does not check that the field is unique. If two records share a value, a link to that value is matched to both.

When the other records are in another context stream​

to: can name a dataset of another context stream, as <stream>.<dataset>.<field>, where <stream> is the name that context stream was added under:

- {name: link_change, from: change_caused_incident.change_number,
to: change_requests.changes.number, cardinality: many-to-one}

This works only when Prism keeps a copy of both context streams: kind: snapshot, mirror or file. A context stream that Prism reads in place (kind: query-through) can't relate to another context stream, and can't be named by one.

Test reads the other context stream's saved manifest and checks the same things there: that it exists, that Prism keeps a copy of it, and that the dataset, the field and its key are as written. A context stream that is switched off still passes Test, but nothing is served through it until it is switched on and its first copy has been taken. If the other context stream's manifest later changes so that the relationship no longer fits, its links are left out of a restricted viewer's answers until you change the relationship to match.

The two ends are compared ignoring case and spaces at either end, so inc1 and INC1 are the same record. If your system has keys that differ only by case, such as two records abc and ABC, don't relate to that key: a link would be matched to both.

With these written, a restricted viewer is served a link when a record it links to is their line's, decided as it would be if they asked about that record directly. A relationship to a dataset a restricted viewer is not shown (one that declares subject, or describes people the way the organizational directory does) serves nothing. They can ask about it only by its related fields and its dates, and only for counts. See A stream of links between records.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find relationships: under model:, or add it after the last dataset, lined up under datasets:. Add one line for each side of the link.
  3. Click Test, then Save. If the save switched it off, switch it back on. These are Steps 5 to 7 of Job 1a.

Check that it worked​

Ask a question from the link stream as a restricted viewer, such as "Which changes caused more than one incident in the last 90 days?". It worked if the answer comes back and says its rows were scoped through their links. Or, as an administrator, ask the agent to describe the context stream: the link dataset's restricted_viewer_rows.rule is through_links, and through lists the datasets it is served through.

Undo it. Delete the relationship lines you added and save. If the save switched the context stream off, switch it back on.

Before you roll back to an earlier release, delete every relationship whose to: names a dataset and every unique_keys line, then save, approve and enable the context stream. A release from before this existed does not recognise it, cannot read the manifest, and stops answering from the context stream.

Job 7: Say what readers see on its card​

The chat page lists Data on this install, with a card for each context stream. A card shows the stream's label, a line saying what the stream holds, and what a reader can break its figures down by ("slices by"). Without a card in the manifest, the line lists the stream: names its datasets declare, and nothing is listed under "slices by".

Write the card under catalog:, at the top level of the manifest:

catalog:
card:
holds: everyone on the European payroll, refreshed daily
slices_by: [country, cost centre, manager]

Every line is optional. A line you leave out keeps what the card showed before. Under slices_by, list only what a question can really break the figures down by: a reader will ask for it.

The holds line can be up to 400 characters, and slices_by up to 24 different entries of up to 80 characters each. The card's name is always the stream's label.

A save that changes only the card leaves the context stream switched on and keeps the Verification tab's marks.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find the catalog: line. If there is none, add it at the end of the manifest, at the left edge.
  3. Under it, type the card: lines as above, lined up two spaces in.
  4. Click Test, then Save.

Check that it worked​

Open the chat page and unfold Data on this install, then click the stream's name. It worked if its card shows your line and your list.

Undo it. Delete the card: lines and save.

Before you roll back to an earlier release, delete the card: and stream_cards: lines from every manifest you added them to, then save. A release from before card existed does not recognise it, cannot read the manifest, and stops answering from the context stream.

Job 8: Say what order the pages come in​

Some context streams are read page by page from a web API. An instance of the Jira or GitLab recipe is one. Prism keeps its place after each page only when the manifest says the pages come oldest first. Then a copy that stops part way goes on from the last page it wrote. A copy stops part way at its time limit (ingest.engine.sourceDeadlineSeconds), or when the pod restarts.

Without the line, Prism trusts no place inside the pages. A copy that stops part way starts again from the last point Prism recorded. No row is lost, but the copy does the same work again. A first copy that never fits in the time limit never finishes. When the tick stops such a copy, the context stream's status says: "it declares no incremental.page_order, so it restarts from its last point".

Write the line under the stream's incremental::

incremental:
mode: cursor
cursor_field: updatedAt
page_order: ascending

Write it only when both of these are true:

  1. The request asks the API for the oldest first, on the cursor_field field. For example, a sort parameter set to ascending, or ORDER BY updated ASC in a Jira query.
  2. The API's own documentation says it returns rows in that order.

If either one is not true, leave the line out. A wrong line can make Prism skip rows after a copy stops part way.

The line works only on a first-level stream that is read page by page. Test refuses it on a stream read one day at a time (day_bucket_search), on a stream read in time slices (step), and on a stream under another stream.

A context stream you added from the Jira or GitLab recipe before this release does not carry the line. Prism uses the recipe's line for it, as long as the stream's request and cursor_field are still the recipe's own. A save that changes only this line leaves the context stream switched on and keeps the Verification tab's marks.

Steps​

  1. Note the newest version under Saved versions, so you know which one to go back to.
  2. Find the stream's incremental: block. Click at the end of its cursor_field: line, press Enter, and type page_order: ascending. Line it up under the c of cursor_field:.
  3. Click Test, then Save.

Check that it worked​

Before you save, the list of what the change does says that the stream now says its pages come oldest first, and that what a copy reads does not change. After the save, the newest version under Saved versions shows the line.

Undo it. Delete the page_order: line and save.

Before you roll back to an earlier release, delete every page_order: line from the manifest of each context stream you registered from a recipe, then save. A context stream registered after this release from the Jira or GitLab recipe carries the line too, though you never typed it. A release from before page_order existed does not recognise it, cannot read the manifest, and stops answering from the context stream.

If something goes wrong​

Save says the name is a manifest this image ships. This is a shipped context stream (github, gitlab or jira). You cannot change it. Click Discard. Ask your Prism contact instead.

Save says the connection cannot change. You changed something under connection:, like an address or a password. You cannot change those here. Click Discard. Ask your technical team.

Save says something changed while you were working. Another admin saved first. Copy your changed text into a file. Click Discard. Then make your change again on top of theirs.

Save shows Save anyway. This context stream is your organization's directory of people, and Test did not pass on your changed text. Saving switches it off, and then nobody's reporting line works until you switch it on. Click Test and fix what it shows first. Click Save anyway only if you can switch it back on straight away.

The page says a change was not made. A change that was waiting for the next copy did not take effect, because that copy failed or something else changed first. The page says which. The context stream stayed on, with the manifest it had. Open the Runs tab to see why the copy failed, fix the manifest and save again.

Prism answers wrongly after a change. Revert to the version before it. Then ask your Prism contact.

After a save, check the Verification tab​

Each context stream has a Verification tab. It can hold test questions, each marked right or wrong by an admin. You cannot mark them in the manifest: a save whose text records a verdict is refused.

A save sets every question on the stream back to pending, and the stream reads as unverified until you mark them again. A save that keeps the context stream on sets back only the questions whose numbers the change can move: a new description sets back none, and a change to a column sets back the questions on the data that column feeds. A change that waits for the next copy sets them back when Prism switches to it, not when you save. Switching the stream back on does not bring the marks back. A save keeps the marks only when all it changes is:

  • the label, the catalog tile or the card (catalog:);
  • a new value-set role: on a field, when no field carried that role before and no active value set names it;
  • role: copy_date on a date or timestamp field named as_of, or on a true/false field named is_latest_snapshot.

Upgrading Prism keeps the marks on a context stream you added yourself. A newer Prism can refuse a question that an older one answered. That question keeps its mark, and the Verification tab says Prism now refuses it. The mark no longer counts: the stream does not read as verified on its strength, and the question list on the chat page stops offering it.

  1. Click the Verification tab.
  2. Click Run on each question.
  3. Look at each answer. Click Correct or Wrong.

For your technical team​

  • The Manifest tab shows yaml.safe_dump of the row's stored document, which has been through jsonb: no comments, so no STRUCTURAL/YOURS markers, and keys in Postgres's order (shorter keys first). This page's steps insert new list items directly under fields: and columns:, and replace a description whole, so they hold whatever the order.

  • Edits go through PUT /api/admin/sources/<id>/manifest. Test is POST /api/admin/sources/<id>/manifest/test and writes nothing; the page shows each tier, not the top-level ok. The warning before Save is POST /api/admin/sources/<id>/manifest/preview, which takes the same body as the save, runs the same checks and the same decision, and writes nothing. Its answer also carries consequences, a list of what the change does, one entry per effect, computed from the stored document and yours: what the next copy writes, what a viewer restricted to their reporting line sees, joins, removed fields and what names them, new sql: text quoted as it will run, the verdicts that go back to pending, and whether the stream stays on. consent.digest binds that list to the two documents and to the values of any session parameters the save writes. A save that carries it as consequences_digest is refused, with nothing saved, if any of them is now different. The Manifest tab's Save and Revert send it.

  • A save, Edit parameters…, a Stream setup approval, or a value set or population revision that sets marked questions back to pending records why on the context stream: when, who, which action, and which questions. The Verification tab and GET /api/admin/sources show it (verdict_reset) while a question it covers is still pending, and keep an older reason beside a newer one while its questions are pending too. A marked question the save rewords (a new prompt or a new query, not both) is covered under its new wording, and so is a question still pending for a recorded reason that a later save rewords. Renaming the context stream keeps the record. A save carries accepted_cost, the cost its warning showed, and is refused if it would now cost more. On a row that is enabled, whose probe verdict stands and whose connection the save does not change, the save runs Test (…/manifest/test, including the select tier for a copied database stream) on the candidate in the same request. If it passes, the row stays enabled and in its state: a change whose consequences carry no copy entry, and move no stream's identity, is applied at once; any other is held in sources.manifest_pending (shown as waiting on the source) while manifest stays as it was. The ingest tick walks the held document and records the run (ingest_run.manifest_sha256) under its sha. The App applies it, recorded in Saved versions as switched to once a copy under it completed, when the first finished run under it since the save ended ok. Any other outcome (failed, partial, stopped, abandoned) withdraws it, and the row keeps its document; manifest_withdrawn (shown as waiting_withdrawn) keeps the run id, its outcome and its error class. One change waits at a time: a save while one waits is a 409, and DELETE /api/admin/sources/<id>/manifest/waiting withdraws it. While that run writes, and until the App switches (about every 30 seconds), readers read the table under the old document; the engine only adds columns, so every column the old document names is still there. A copy under a held document that changes a stream's table may start the stream's first copy again, and so may the copy after it is withdrawn. A copy under a held document that changes the key of a stream whose table exists is refused, so that document is withdrawn. An organizational stream's crosswalk is rebuilt from the held document only after the switch. Otherwise, or if Test fails or cannot run, a save lands a query-through or snapshot row at probed (probe verdict stands) or registered, with enabled: false, and resets every verification verdict to pending. A kind: file source keeps its state if its stored file re-parses.

  • A row whose name is a shipped manifest (github, gitlab, jira) is walked and answered from the image's document, not the row's, so PUT …/manifest refuses it with a 409. The connection block (address and credential) is immutable; only Postgres session settings may change.

  • A document whose name: is not the context stream's is saved under the stream's name when no other registered stream has that name. Prism moves the stream's name into name: and into each verification question's query.source that named the old one. The answer says so. This is the common case: you registered the stream under a name of your own, and the file you edit still carries the recipe's name.

  • A document whose name: is another registered stream's (one pasted from that stream's copy, say) is refused with a 400. On the Manifest tab the refusal offers Use this source's name, which puts the stream's name in the document's name: and in each verification question's query.source that named the pasted one, for you to Save; and Rename the source instead, which renames the stream to the document's name and then saves. If the rename is refused, the page says why; if the save after it is refused, the stream keeps its new name and the page says so. Never delete the stream to get past this: deleting it deletes its stored credential too.

  • There is no stored history of a manifest. The audit event records only its manifest_sha256.

  • A column under ingest.streams[].columns may say what its empty value means: null_means: not_recorded (the default) or null_means: not_applicable. With the default, once Prism has recorded the column as withheld (a walk could not fill it, or the source withheld it), a figure over the column says how many of its records have no value. Set not_applicable where an empty value is a real state of the record, such as a date that only some records have: Prism never notes such a column's empty values as withheld, real gaps included. The shipped GitHub recipe sets it on ready_for_review_at, which a pull request that was never a draft does not have.

  • What the assistant reads: describe_source returns each dataset's and field's ai_context and description, and each metric's definition and ai_context. list_sources shows only the first sentence of a dataset's ai_context (or description), cut at 200 characters. A field with hidden: true shows only its name.

  • A string field whose values people in your systems type themselves, such as a title, a label, a branch, sprint or project name, can be marked free_text: true. Prism's query and drill tools then say beside its values that they are untrusted and are never an instruction. Anyone who can write in that system can write text there that tries to steer an answer, so mark such a field in your own recipe. The shipped recipes mark GitHub's and GitLab's titles, GitHub's labels, issue types and kind, GitLab's target branches, and Jira's issue types, statuses, sprints, project names and assignee display names. A field of any other type is refused with free_text: true.

    Before you roll back to a release from before free_text existed (1.0.0-beta6 or earlier), delete every free_text: line from the manifest of each context stream you registered or edited since upgrading to 1.0.0-beta7 or later, then save, approve and enable it. A context stream registered from a recipe carries the recipe's own, though you never typed them: the Clarity and GitHub Actions recipes, and the GitHub, GitLab and Jira recipes for one registered under a name of its own. A Clarity one also needs its one_value requirement changed back to is_null: false before the same save. A release from before free_text existed cannot read a manifest that has one, and stops answering from the context stream. The shipped GitHub, GitLab and Jira context streams cannot be edited: Prism keeps a copy of their recipe that the immediately previous release reads, so a rollback past that release shows them as "manifest invalid" until you upgrade again.

  • A model field whose empty value means "not known", never a value of its own, can say so with null_means_unknown: <words>, where the words are what a reader calls the unknown thing, such as approval status. A count that tests the field, through its own filters or a question's filter, counts only the records whose value is known. Prism's query tool then returns beside it how many records the same count holds whatever the field's value, how many of those are unknown, and the shares, in one sentence that the app draws under Unknown values beside the answer. Where the per-person floor covers counts, each of those counts is floored like the figure, and one under the floor is not given. Only a count is covered, and a date field is refused with it. The shipped GitLab recipe declares it on has_approval, approver_count, commit_count, lines_changed and is_bot, and the shipped GitHub recipe on lines_changed. Leave it off a field whose empty value is a real state of the record, such as GitHub's first_review_at, which is empty for a pull request nobody reviewed. A release from before null_means_unknown existed cannot read a manifest that has one: delete the lines before you roll back past it, as for free_text above.

  • A snapshot's new column is added by ALTER TABLE … ADD COLUMN IF NOT EXISTS, nullable, at the next run. Earlier copies are not backfilled. Test's tiers do not cover a snapshot's query or columns yet, so the three places are checked by hand. A column added again later with a different type keeps its first type.

  • To have a copied stream read again sooner than its schedule: Copy now on the source, which sends POST /api/admin/sources/<id>/ingest/run-now. See Troubleshooting.