MATables are SAS datasets used by Customer Intelligence to represent the population (customers, households, etc.) of a node in a diagram. For example, if the count on a select node selecting customers is 3,456 then it will have an associated MATable containing 3,456 rows, each row containing one customer ID. These MATables are retained after the count is completed so that later executions of downstream nodes won't have to recreate the node population. This helps performance but can lead to exports being created using out of date information if export nodes and communication execution are used unwisely.
When are MATables created and deleted?
Each time you execute a node in a campaign, whether by scheduled execution, interactive execution or using the nodes' "run" or "update counts" action, a new MATable is created for that node. If the node had a count prior to this execution, then an MATable was associated with that node and is replaced by the new MATable. MATables that are no longer associated with a node are deleted when the campaign is closed. If you saved the campaign prior to closing it, then the old MATables are deleted.
But if you do not save the campaign prior to closing it, the new MATables will be deleted (since the campaign is reverting to its prior counts/node populations). MATables associated with nodes in a campaign are also deleted when the campaign is deleted. While there are some exceptions, in general a saved/closed campaign will have one MATable associated with it for each node in the campaign that has a count on the node.
How can I reduce the number of MATables being saved?
When are new tables created to replace old ones?
Saving the linked (target) campaign without counts also ensures that execution of campaigns referencing the target cell/campaign via a link node will trigger creation of current population MATables (since linked campaigns are opened read-only and any MATables produced during their execution will be discarded when the linked campaign is closed.)
Can I just delete all MATables older than X months?
In early MA releases, deleting MATables would cause "missing table" failures during execution if the deleted table was referenced. This occurred because checking for the existence of an MATable required executing a stored process, which greatly slowed opening campaigns.
In later releases (starting ~5.4), we decided that it was worth the performance hit on opening campaigns to avoid the execution failures and the existence of all MATables is checked when opening a campaign. You should now just receive a warning when opening the campaign; the node with which the deleted MATable was associated and all nodes following it in the diagram will lose their counts. Deleting or clearing counts on old campaigns is a safer option, though.
Thanks, very clear and useful.
Thank you for that feedback, @franmarq! Are there other topics you'd like to us to address with an article? Comment below.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.