We are currently performing a clean up on our marketing cloud instance with 30 BUs.
Currently, we have a ssjs script that fetches all the data extensions and it's row count using the undocumented API mentioned here. The use case is to delete the data extensions that are junk/test using this method. The problem is while fetching the data extensions, we are also getting a list of System data extensions(not visible on UI). Is there a way where we can identify these data extensions, so that we can exclude them from our script? I have checked the Data Extension object and it has no field to identify this.
The System Data Extension (Data Views) have a name starting with an Underscore ("_Subscribers", "_Opens", etc.). Most of them are listed in official SFMC docs.
Few missing from the official documentation you can find in Zuzanna's Post and my Docs
Additionally take into consideration the Einstein Data Extensions if you have them enabled. Those start with either "IGO_", "PI_" and "Einstein_" prefixes.
If you are using Behavioral Triggers, you should also leave Data Extensions with "abandoned_" prefix