You need to sign in to do that
Don't have an account?
Keith Stephens 18
Find Null Fields
Hello All,
I am in need to find a way to search Saleforce Database for Field or objects that were created but never used and there is no data in them.
So if you were to selct from these tables and fields it would be null.
Thansk,
Keith.
I am in need to find a way to search Saleforce Database for Field or objects that were created but never used and there is no data in them.
So if you were to selct from these tables and fields it would be null.
Thansk,
Keith.
You can able to use Salesforce reports .. Create reports on a different object and filter the data based on null values
Or you have to export the data into external or csv files to analyze the values
I guess noting is there native to SF..
I have writen some programs for this problem and the easiest way is to read all the exported CSV files (setup > data export).
Any CSV reader is sufficient. https://commons.apache.org/proper/commons-csv/
Comparison: https://github.com/uniVocity/csv-parsers-comparison
You can always read big exported CSV files (no time out, no governor limits).
What is the maximum number of records of your objects and the number of custom fields?
With few custom fields and some hundreds of thousands of rows (up to one million), generated dynamic SOQL queries with Rest API calls (can be done in Apex): select myfield1__c from myObject__c where myfield1__c != null limit 1 ... are sufficient but you can have a time out nevertheless if you have big objects (not declared as big objects). When I launched parallel calls in java (10 queries for instance), the responses are incredibly fast (the DB engine of Salesforce is impressive and very powerfull despite of the governor limits).
AppExchange tools: rarely free when powerful or limited free version in reality (free or limited is the same) or buggy (crashes because of the governor limits or a time out which are very difficult to overcome with synchronous requests from a screen with too simple algorithms) but it is always interesting to test all these "free" tools if you have not too many records and you select an object one after another (great but slow and many manual operations)
Field Trip (powered by RingLead): Run reports on standard and custom field usage.
Ever wish you could run reports on the fields you have in Salesforce? Take a Field Trip! This utility lets you analyze the fields of any object, including what percentage of the records (or a subset of your records) have that field populated.
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000003HSXEEA4
In theory, that should be the "best" tool for analysing CSV files with its dataframes but with really big files, you have to complicate the queries (reading by chunks with cumulative results) and a simple CSV reader is sufficient when you don't need complicated statistics.
I used Pandas to have the first most used values for example. Pandas is useful for this kind of results directly from CSV files (including with filters) with short code in python.
With some lines of code in python by using pandas, you can have directly the result of all the empty columns.
account_columns_null.py
Panda automatically analyze all the columns in its dataframe (excepted "col not in ['Id','Name' ... ])
It is the shortest way but you cannot read gigas of data directly with Pandas and reading by chunks complicate the final results.