Life cycle of an InMemory table in a PA Calculation

Question

When an InMemory table is created by an Analytics calculation logic, is it preserved across row evaluations?
Is the behaviour different when a feeder is used?

Answer

When a table is created in an Analytics calculation, it exists for the duration of the calculation, unless it is explicitly dropped or replaced by the logic.

This holds true also for feeder calculations. The state built up by the regular/consumer formula is preserved across evaluation of the emitted objects. The state consists of values stored in the api.global map and also the tables in the TableContext.

This provides the opportunity to build up caches etc. to be shared by all evaluations. But it obviously also means you’ll need to clean up anything not to be shared (especially when resource hungry like an in-memory table).

Found an issue in documentation? Write to us.

Â