Analytic Snapshots

,

Reports, by their nature, are a representation of the state of your data at a certain point in time, including data values taken from underlying data objects at that time. If the data changes, a second, minute or day after the report, the existing report does not reflect those changes.

The data in a report is static by its very nature–there is no getting around it. Typically, report users understand this inherent limitation. Data in a report is old, but there is such a thing as data that is too old and therefore invalid.

Individuals can, of course, run a report whenever they want to see the latest data. This approach has some virtues, but also some downsides. Running a report over and over again not only increases resource requirements for the report and its consumers, but there is no guarantee that these multiple reports contain the same data, leading to potential problems of data integrity.

The Force Platform includes a way to address these problems—the analytic snapshot. An analytic snapshot is a way to direct the output from a report into a custom object. This custom object can then be used as the basis for report types and a wide range of reports, based on a static set of data.

You can schedule an analytic snapshot to run at certain times, controlling its refresh rate. By setting up a regular refresh of analytic snapshots, you create the data groundwork for spotting and understanding overall trends in your systems. You also use analytic snapshots to emulate the functionality provided by ‘batch’ reports run on a daily or weekly schedule.

Creating an Analytic Snapshot

Creating an analytic snapshot involves three steps:

1.
Create a custom object that receives the data produced.

2.
Create a report that generates the data directed to the custom object.

3.
Link the report to the object and schedule the execution of the collection.

These analytic snapshots can also be used as the basis for dashboards, discussed in the final section of this chapter. They focus on the overall progress of the recruiting process, displaying trends in the number of applications received each week, the number of positions posted each week and the number of positions closed each week.

Creating the Custom Object

The data for the first trend is captured in the custom object you create in this section.

1.
1. Go to Setup Create Objects to start the creation of a new object. Click New Custom Object.

2.
Create a new custom object with the Object Name of Recruiting Tracker, a plural name of Recruiting Tracker Records, an appropriate description, a Record Name of Recruiting Tracker ID with a Data Type of Auto Number, and a Display Format of TRACK-{00000}. Allow reports for this object, but there is no need to allow activities or track field history. Click Save.

3.
Add the fields listed in the table below.

Table 6. Field for an analytic snapshot
Data TypeNameSize
LookupJob Application 
LookupCandidate 
TextFirst Name30
TextLast Name30
LookupPosition 
Application Created DateDate 
Date/Time CollectedDate/Time 

Note

Why did you include more information in this custom object than just the summary information? You will see, in the next section, that the reports you create from the analytic snapshot can also be used for a more detailed view of the data.


The other components required to receive the analytic snapshot data were created by following the instructions for this chapter in the Code Share project for the book, called out at the beginning of this chapter, and explained in Chapter 1: Welcome to the Force Platform.

Creating a Report

The report you create to feed data to the analytic snapshot is pretty simple since the purpose of this snapshot is only to collect basic data on a weekly basis.

1.
Go to the Report tab and create a new report, based on the report type in Other Reports named Positions with Job Applications and Candidates.

2.
Accept the default of a tabular report and click Next.

3.
Select the following fields for the report:

  • Position: ID

  • Job Application: ID

  • Job Application: Created Date

  • Candidate: Candidate ID

  • Candidate: First Name

  • Candidate: Last Name

These report columns match up with the fields in the custom object you just created. Make sure to uncheck the Job Application: Job Application ID, Candidate: Candidate ID, and Postion: Postion ID fields.

4.
You do not need to add any summary information or order the columns, so jump to the Select Criteria page. Change the View to All positions, the next Columns field to Job Application: Created Date and the Duration to Last 7 Days under the Day heading in the picklist.

5.
You can run the report now and then save it, or simply save it as an unfiled public report named Applications Posted.

Now that you have created the destination and collection reports for the analytic snapshot, you can put them into action.

Creating an Analytic Snapshot

Once you have a custom object as a destination and a report to feed data to that destination, you can define an analytic snapshot.

1.
Go to Setup Data Management Analytic Snapshot to see a splash page with an overview of analytic snapshots. Bypass the splash page and click New Analytic Snapshot to bring up the page shown in below.

Figure 103. New Analytic Snapshot definition page


2.
Name the new analytic snapshot Recruiting Snapshot and enter an appropriate description.

3.
Set the running user to the administrator so that the snapshot picks up all the job applications.

4.
Select the report and custom object you just created for the Source Report and the Target Object. Click Save to bring up the page shown in the following figure.

You can see the basic information in the top section and three additional sections. The second section, Field Mappings, must be completed before scheduling an analytic snapshot.



Figure 104. Analytic Snapshot configuration page


5.
Click Edit in the Field mapping section to map the fields in the report to the fields in the custom object on the page shown below.

The picklists on the left contain all the fields in the report that are appropriate to match with the fields in the target object. For the Job Application, Candidate, and Position lookup fields, there is only one field available for matching. The picklists for the text fields contain all the fields in the report and the picklists for the date fields contain only date fields from the report.

Text and data field picklists also contain three fields that are related to the analytic snapshot itself: Analytic Snapshot Name, Analytic Snapshot Running User and Execution time. Use these fields to identify rows in the target table based on attributes of the scheduled run of the analytic snapshot.



Figure 105. Mapping fields for an Analytic Snapshot


6.
Select the following fields from the source report to match up with their corresponding fields in the target object:

Table 7. Mapping report fields to object fields for analytic snapshot
Source Report FieldsTarget Object Fields
OwnerUnassigned - user who runs snapshot is assigned
Job Application: IDJob Application
Candidate: Record IDCandidate
Position: IDPosition
Candidate: First NameFirst Name
Candidate: Last NameLast Name
Job Application: Created DateApplication Created Date
Execution TimeExecution Time
Position: IDPosition

7.
Click Save to save the field mappings and return to the detail page for the analytic snapshot. When you return to the detail page, you see that the warning message about your analytic snapshot is gone since you have defined your field mappings. You can now schedule your analytic snapshot to run.

Figure 106. Scheduling Analytic Snapshot


8.
Click Edit in the Schedule Analytic Snapshot section to bring up the page shown above.

In this page, you can specify who receives an email notice that contains information on the outcome of a scheduled run. Typically you leave the default selection of To Me checked, although you can also specify any individual user or public group, described in the next chapter.

In the lower section, you assign the times you want the analytic snapshot to run. You can choose from daily runs, either every day or only on weekdays, weekly or monthly and set the range of dates to use this schedule.

If you click the Preferred Start Time, you receive one or more options for the start time of the analytic snapshot run. The number of choices depends on the specifics of the your Force Platform edition. The choices are determined by the geographic region supported by your organization’s Force Platform instance, with three random start times chosen from off-peak hours for that node. To avoid overloading the Force Platform servers, a randomized start time is assigned for each snapshot run, somewhere within 30 minutes of the selected start time.

Your particular edition of the Force Platform has limits on the number of snapshots you can run over a certain period of time. Analytic snapshots also have a limit on the number of rows they can contain. If the report feeding the snapshot produces more than the designated limit, additional records are not inserted into the object, and are reported as failed inserts.

9.
Select Weekly as the Frequency and Sunday as the selected date. Leave the default start and end times, which allocate a month of runs, and select a preferred start time.

10.
Click Save to save the schedule and return to the detail page for the snapshot. When you get to the detail page, you see your new schedule listed in the Schedule Analytic Snapshot section.

When the snapshot runs, you receive an email listing the results, including a link to a detail page for the report run. The report run is also listed on the detail page for the analytic snapshot.

An analytic snapshot run can have several results. A run can result in some row failures, such as if a row was not inserted due to a missing value for a required field, or a failed validation, or a run can completely fail to run, such as if the user designated to run the snapshot is not active at the scheduled time.

Caution

Triggers and workflows on a target object are not executed as a result of an analytic snapshot run. In fact, you are not allowed to use an object with a trigger as the target of a snapshot, and adding a trigger to a target object results in the run failing.


You have now learned how to create and use analytic snapshots. The final section in this chapter covers dashboards that require a few more analytic snapshots, as well as historical data, to work properly, which were loaded in the initialization task for the chapter, described in the Code Share project for this book.

Scheduled Reports

Analytic snapshots include a way to schedule a report to run at a specific time. This functionality is also available for any report in the Force Platform report system. You might have already noticed the interface to this scheduling capability. The Run Report button on report pages actually has a dropdown arrow on the right hand side of the button with a choice for running or scheduling the report. Choosing to schedule a report brings up the same scheduling page that you used with your analytic snapshot.

When a scheduled report runs, the content of the report is delivered in the email message specified on the scheduling page. This approach is different from analytic snapshots that save the data from the report in a custom object for later examination and use. In a scheduled report, the data is not persisted in the Force Platform database. There is also no record of the success or failure of a scheduled report run outside of the email messages sent on its completion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.234.161