How to Reduce Consumption of "-Analytics" Tables in Microsoft Dataverse

The storage model of Dataverse is broken down into Database Usage, File Usage and Log Usage. Keeping Dataverse storage under the limit can be challenging. When the storage size exceeds the limit, you must start paying extra, which can be costly.

Recently one of our clients came to us with an issue around File Storage. Upon investigation, the “email-analytics” entity was bloated with around 80GB of file storage. If you go into the Dataverse storage report, you will not find any " email-analytics " table, not even in advanced find. The reason is that it is not stored in Dataverse but in Azure Data Lake. EntityAnalyticsConfig table/entity reference.

Then the question is, why does Dataverse get bloated?

The “email-analytics” entity gets created when the “Sales Insights” Add-on is installed in the environment, and the “Email Engagement” toggle is switched ON from the Sales Insights settings area.

Sales Insights Settings

Standard Email Engagement Toggle

Let’s dig into more details to find out the root cause of the issue and walk you through how you can get rid of the “email-analytics” storage size in the image below.

Dataverse File Usage Analytics

There is a hidden entity in Dataverse that can be found via advanced find or tools like XRM toolbox fetchXML. The entity's logical name is “entityanalyticsconfig”. Below are the results of the fetch XML query of the “entityanalyticsconfig”.

If you notice the two outlined columns “isenabledforadls” and “parententitylogicalname”. If the values of the isenabledforadls are set to True, the entity listed under the parententitylogicalname is enabled for Azure Data Lake Services integration.

I anticipated it might be a quick fix if we switched OFF the “email engagement” toggle.  

Email Engagement Toggle set to “OFF”

But alas! It was not as expected. Still no change. I thought to give it overnight and check later. There can be replication time over the server to update the storage. Still, no luck. The storage was the same where it was left the day before.

After going through some Dynamics community forums, I followed the instructions and deleted the “Sales Insights Add-on” solution from Solution Explorer.

Please note it is always wise to create a manual backup of your environment before deleting data.

And again, that did not work either.

What did the trick for me is detailed below. If you remember, I mentioned the table entityanalyticsconfig earlier in this blog. I improvised and created a new flow to set the email entity isenabledforadls flag from True to False.

Here is a screenshot of this basic flow.

Power Automate Flow

Steps in the flow:

1.       An on-demand flow.

2.       List Rows to get the “Entity Analytics Config”.

a.       Filter with the entity you want to update the isenabledfordls flag to false. In my case, it is the “email” entity.

3. Apply to each step and update the isenabledfordls flag to No.

Please DO NOT set flags for all entities to FALSE. If you are using the Marketing Cloud like Dynamics Marketing, you might lose all the insights data.

Below are the results. The entity completely disappeared from the Dataverse storage analytics, and file storage decreased significantly.

File Usage after the fix.

That’s all! If you are facing storage issues in your Dynamics 365 environment, we can assist you, please contact us, and we can perform a health check on your environment.

Previous
Previous

Deployment Pipelines in Power Platform