Skip to content

History, repeats and size

By the end of this page you will have decided how much history the view keeps, how it handles a line that changes, and how a large table stays cheap to read.

BInbox works out a month against the prior month and against the same month a year earlier from the rows themselves. It cannot compare with a period the view has left out.

A view that covers the last 24 months leaves the first 12 months with no comparison against a year earlier. Keep one year more than the oldest figure people will compare.

Some pipelines add a new line each time an order changes, a status moves or a figure is restated, and leave the earlier lines in place. BInbox then sees several lines for one order number. It asks on the strip over the Dashboard what the extra lines are, as Check the setup describes, and Changes to an order keeps only the latest line for each order.

That answer works when something in the data says which line is the latest, such as a version number that rises or a time that moves forward. It says so on its card, such as “Latest by version, the highest one.” When nothing says which line is the latest, the card says that, and the answer cannot be picked.

The cleaner answer is to settle this in the view, so that every row is current and no one has to answer.

The worked example shows the query that keeps the latest row for each order. Keep the earlier versions in a table of their own when you need the history of the changes, because the view is for reporting what is true now.

BInbox reads your data where it is kept, in one of two ways, Extract or Live, which Pick a table describes. In both, a table that is large costs more to read, and a few habits keep it down.

  • Partition or cluster the table by its date column. When you choose Rows to read and name the partition column, a warehouse that bills by data scanned, such as BigQuery, bills for those days alone (BigQuery).
  • Leave out columns people will never split by or add up, such as raw payloads, long notes and internal flags. Fewer columns are fewer bytes to read, and the field pane is shorter.
  • Prefer a table your pipeline builds on a schedule to a view that does heavy joins each time a card is drawn. A view is fine when the work under it is light.

The read-only login must be able to read the tables under a view, as well as the view. When it cannot, a read of the view is refused. Grant read on the view and on every table it reads, or follow your warehouse’s rules for a view that reads with its owner’s rights, in the guide for your warehouse in Connect a warehouse.