Saturday, December 17, 2022

Data Import Wizard and Data Loader Interview Questions and Answers

1] What are a data import wizard?
ANS:       A) Import wizard is a web based tool to process bulk records.
B) With import wizard we can process maximum of 50,000 records.

2] What are standard objects available in data import wizard?
ANS: Account and Contacts, Leads, Solutions, Campaign Members.

3] Which operations can we perform in data import wizard?
ANS: A) Insert B) Update and C) Upsert (Insert and Update both at a time)

4] What is Data Loader?
ANS: Data Loader is a stand-alone tool to process bulk records. With Data loader we can process maximum of 50 million records. Most of the time we use only Data loader. Default batch size of the Data loader is 200.

5] Which operations we can perform on data loader?
ANS: A) Insert (Inserting brand new records, no need of ID)
B) Update (Updating the existing records based on the record ID)
C) Upsert (To Upsert we should have one external ID field on the object, based on the external id field if the value already exists it will update, if doesn’t exist then it will insert)
D) Delete (Delete the records based on the id provided, to delete we need only id, deleted records can be found in recycle bin)
E) Hard delete (Delete the records based on the id provided, to delete we need only id, deleted records  can’t be found in recycle bin, Note: If we enable bulk API in data loader settings then only we can perform Hard delete.)
G) Export (From any object we can export records based on the SOQL query, Note: We can’t export deleted records which are there in the recycle bin)
H) Export all (From any object we can export records based on the SOQL query, Note: Using Export all we can export deleted records which are there in the recycle bin also)

6] Data loader or Import wizard supports which file format?
ANS: CSV (Comma Separated Values)

7] What is the filed mapping file format of the data loader?
ANS: SDL ( “Salesforce Data Loader” file of Field mapping)

8] How to insert null values into data loader?
ANS: In data loader settings we should enable ‘insert null values’ checkbox otherwise we can’t insert null values.

9] What is external ID?
ANS: Suppose we have account table in Salesforce and account table outside of the Salesforce (ex: .csv file, sql database). In Salesforce all the records can be identified with record id and outside of the Salesforce we can’t recognize records with Salesforce id that is the reason to compare outside table and salesforce table in Salesforce for one of the field we have to enable external ID (we can enable external id for text, number, auto number and email). If we enable external id we can compare that particular column with the column which is available in external table. While comparing if the both column values are same then it will update otherwise it will insert.

10] Maximum batch size of data loader?
ANS: 10,000 records and minimum 1 record.

11] What is default batch size if we enable bulk API?
ANS: 2,000 records.

12] In data loader, if user inserting 5 lacs records (Ex Customer.csv) and after inserting 3 lacs records system crashed. What to do, should user start inserting all 5 lacs again OR delete already inserted records from data loader.
ANS: Before system crash, 3 lacs records inserted and then data loader generates a success.csv and failure.csv file. From success file, we can get how many records inserted successfully. Let’s say 3 Lac.
Now, go to setting of data loader and choose, “Start at row number” and here insert row number 300001, so, now it will start from 300001 row number in Customer.csv file.
No need to delete exiting inserted data.

Text Box: NOTE –Data loader skips first row of CSV file, because this row represents header. Data loader consider CSV file as an array (starting from 0). So, if as per CSV file, if you want to insert data from row number 5, then enter 3 in Start at row number  in data loader.aa

13] How to enable Hard Delete button of data loader.
ANS: Go to setting of data loader and enable Bulk API checkbox.

14] Though Hard delete button is enabled, but user is not able to hard delete the records in salesforce.
ANS: Go to user’s profile in salesforce and enable Bulk API Hard delete checkbox.

15] Bulk API Hard delete checkbox is disabled for System Administrator profile. What should we do?
ANS: Hard delete a record is a sensitive task, hence by default disabled for System Administrator profile.
Create new permission set, System Permissions, and here enable Bulk API Hard delete checkbox.
After this assign this permission set to user of system administrator profile. Records will be hard deleted now.

16] How to generate security token which is required while login into the data loader?
ANS: Go to My setting -> Personal-> Reset my Security Token.

17] There is a customer object in salesforce with a field age. Business says that, if an user creates a new record in the salesforce with AGE < 18, then it should fetch in error “Age must be greater OR equals to 18”.
But if user enter record from data loader with AGE < 18, then it should enter in salesforce and should not give any error. How can we accomplish this requirement?
ANS: Create a check box “Allow Less Age” on custom object.
Create a validation rule with formula (Age <18 AND  Allow Less Age=FALSE), then show error “Age must be greater OR equals to 18”.

Now, whenever we try to create a new record with AGE <18, it will throw an error.

In customer.csv file, add a customer record with Age<18, add a column Allow less Age, and enter value =TRUE
Now, this will bypass the validation rule and record will get inserted without throwing an error.

13] Difference between Data Import Wizard and Data Loader?
ANS:

Data Import Wizard

Data Loader

Supports for 4 standard objects, Account and Contact, Solutions, Campaign and Leads.

All standard and custom object supported

We can process maximum 50,000 records

We can process 05 million (50 Lacs)  records at a time.

Insert, Update and Upsert operation can be performed

Insert, Update, Upsert, Delele, Hard Delete, Export and Export all operation can be performed

No comments:

Post a Comment

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC)

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC) Introduction: Salesforce Lightning Web ...