Extract External Data into Analytics
Extract External Data Overview
Time to get that data into Analytics so the sales leadership team can have its performance dashboards. It’s your job to administer Salesforce and set it up for the sales team. So you know that most of the data they want to look at is already there, in the Opportunity, Account, and User objects. But some of it, if you recall, is pulled in from an external source. No problem at all for Analytics! Let’s dig a little deeper.
The Sales Operations team at your company uses a Standard Industry Classification (SIC) code field on each account to identify its industry. Sales leaders have a hard time deciphering these codes, preferring instead a good old-fashioned description. So Sales Operations has provided a CSV file with all the SIC codes they use, complete with descriptions. Here’s a snippet:
Your objective in this unit is to extract this data in Analytics so that it can later be added to the Salesforce data you’re going to extract. Here’s a reminder of where we are in the data journey.
Prepare Your CSV Data
When you extract data from a CSV file, Analytics makes assumptions about what type of data it is, based on the values it sees in each field. It assigns each field a type of measure, date, or dimension. These types are important because they determine how you interact with a field in an Analytics lens or dashboard.
Analytics does a pretty good job of assigning the correct field type, but sometimes you need to help determine the right type. So let’s walk through the SIC Descriptions CSV file, field by field, to see what you need to do.
The good news is that you get a chance to preview how your data appears in Analytics, and you can tweak it if you need to.
Upload Your CSV Data
Now that you’ve prepared your CSV file, it’s time to upload it to Analytics using the CSV uploader tool. You also create an app for the new dataset along the way.
- Download the SIC Descriptions CSV file to your desktop from here.
- If you’re not already logged in, log in to the Developer Edition org that you signed up for in the previous unit.
- From the App Launcher ( ), find and select Analytics Studio.
- In the Analytics Studio, click Create and select App.
- You’re creating an empty app, so click Create Blank App.
- Click Continue.
- In the Name your app field, enter Sales Performance Datasets.
- Click Create.
- At the top of the app page, click Create and select Dataset. Creating a dataset from within an app automatically selects the app name for you. Hey, every little bit helps!
- Click CSV File.
- Click Select a file or drag it here.
- Navigate to the CSV file that you downloaded earlier, select it, and then click Open. If the file is within dragging distance, you can drag it into the Select a file or drag it here box instead, and save yourself a few seconds.
- Click Next. Analytics uses the file name as the name for the new dataset, and selects the app.
- In the Dataset Name field, change the name to SIC Descriptions. Analytics detects certain properties of your file, such as the delimiter and encoding. You can review these properties in the File Properties Detected box. To make changes, click and then click Edit.
- Click Next. The Edit Field Attributes screen appears, giving you a preview of the data you’re about to extract to Analytics.
The icon in each header tells you the field type:
If Analytics made a mistake, you can click a column to view and edit its attributes in the Field Attributes panel on the right.
In your data, it looks like Analytics has identified the SIC Code field as a measure. That identification is understandable, but it’s not what you want. If you leave the field type as measure, you can add SIC codes together (not useful), but you can’t group your accounts and opportunities by SIC code (very useful). So let’s change the type.
- Click the SIC Code column. The field attributes appear in the panel on the right.
- From the Field Type picklist, select Dimension.
You also checked the date field in the CSV file to ensure Analytics sets the type and format correctly. So let’s check that too.
- Click the Last Updated column. The field attributes appear in the panel on the right. Looks like Analytics got the data type right but set the format to d/M/yyyy. All the dates in the CSV file are 1/10/2017, which is either January 10 if using the M/d/yyyy format popular in the US, or October 1 if using d/M/yyyy format popular in Europe. Analytics doesn’t know which, so it picks the European format. You want the US format. You can easily change it here.
- From the Date Format picklist, select M/d/yyyy.
As we predicted, Analytics had no trouble correctly identifying the SIC Description field as a dimension. So, it looks like you’re done here. Just click Upload File to finish up.
Analytics uploads the data and gives you a view of progress as it creates the dataset.There’s a link here that takes you to the data monitor to see how the dataset is getting on. But let’s take a break here, so click Close for now. Close the Sales Performance Dataset tab.
OK, time for a hot beverage. When you get back, you can check that the dataset has been created.
Monitor the Data Job and Verify the New Dataset
Behind the scenes, Analytics creates a job for your new dataset, which runs in the background. How long this job takes to run depends on how big your CSV file is and how many other jobs Analytics has on the go. It’s easy to check the progress of jobs through the data manager.
- In Analytics, click the gear icon ( ) and then click Data Manager. The data manager opens in a new browser tab. The first thing you see here is the Monitor tab, with the Jobs subtab selected by default.
- Look for your job in the list. The job name starts with “Upload” and then the name of the CSV file, SIC_Descriptions.
- If you’re interested in seeing what Analytics has done to extract your data, click the arrow (>) in front of the job name.
Now it’s time to check the dataset itself. Check such things as field data types and date formats again in the live dataset. So find the dataset and take it for a spin.
- On the left of the data manager, click the Data tab.
- On the right of the SIC Descriptions dataset, click and select Explore.
- On the left of the new lens, under Bar Length, click the Add a measure button (+). No measures here! Remember, we didn’t set any measures in the field attributes.
- Under Bars, click the Add a group (+) button. Check that your three fields, Last Updated, SIC Code, and SIC Description, are here. This confirms that Analytics has set them as a date or dimension. Close the New Lens tab.
Congratulations! You’ve just turned your CSV file into an Analytics dataset using the CSV uploader tool.
Next up: Bring your Salesforce data into Analytics.