Creating a Data Source

Objective

After completing this lesson, you will be able to create a data source in SAP SuccessFactors Story Reports.

Common Terms Used in Story Report

Here are some common terms that will be used throughout the unit.

Common Terms

Story ReportA story is a presentation-style document that uses charts, visualizations, text, and images to describe data and is organized in pages. It is a unit of execution (run), design, and management.
PageA page is a sub-component of a story report. The page is where we configure the visualization of the data retrieved in a Data Source.
QueryA query is a question you define and send to the data model to retrieve the desired data.
Data SourceA Data Source is a saved query utilized in a story report.
SchemaIn stories, a schema defines the tables, the fields in each table, and the relationships between fields and tables for a particular area in SuccessFactors.
Query DesignerThe Query Designer is the graphical tool that allows you to build the query, preview it, and save it.

We can look at these items from a bottom-up approach as well. In Query Designer, we select tables and fields from a Schema to include in our query. Once you are satisfied with the data returned from the query, you save it as a Data Source. The Data Source is used by components on Pages. One or more pages are organized into a Story Report. The Story Report is then executed, managed, and edited as a logical unit.

Query Designer Overview

The Query Designer enables you to select the fields you want to use to create reports using the Story. The queries you build using the Query Designer are stored within the Stories and cannot be accessed outside the Story. They are saved as data sources for your Story.

The Query Designer page is shown.

Working with Fields Video Tutorial

The Query Designer Launch

The Query Designer will automatically launch when you create a new Story. After you have created a query, you can edit the query by editing the Story Report.

Open Query Designer with a New Report

To open Query Designer with a new report, complete the following steps:

  1. Navigate to Report Center.
  2. Choose New and select Story.

Result: Query Designer will appear.

Open the Query Designer in an Existing Story Report

You may have already saved your data source in a Story but need to enhance or adjust that existing data source. In that circumstance, navigate back to the Query Designer.

To open the Query Designer in an existing Story Report, complete the following steps:

  1. Navigate to Report Center.
  2. Choose edit an existing report.
  3. In the Data section, select Add, Edit, or Delete Data SourcesEdit Data Sourcedata source name.

The Management of Fields in a Query

Now that you have accessed the Query Designer, you are ready to build the query to be used as a Data Source in the report.

Think of the Query Designer as the storyboard for the data you’re going to include in the story. The Query Designer allows you to select and customize the data output, also called a query. Once you have the query just how you like it, you save it as a Data Source to be used in the Story later.

To build a query, you move data elements from the Available Data area into the Selected Data and Filters areas.

Start by expanding the schema and locating the appropriate table. When you determine the table, you can expand the table to display the table's fields.

If you are unsure of where the data you need resides, you can search schemas, tables, and fields with the search box in the Available Data area.

You can add a table or field to the query by dragging the item to the selected data area.

Managing fields in Query Designer, as described in the preceding text.

Query Designer Tools

The query designer has a toolbar with a File section and a Data Section. Tools on this toolbar affect the entire query. The four tools available are as follows:

  • Save - Save the Story Report.
  • Create Filter - Show/Hide the query filter bar, covered in a later section.
  • Create Calculated Column - Launch the Column Overview dialog used to manage selected columns and calculated columns.
  • Create Input Parameter - Launch the Input Parameter dialog used to create input parameters for the query.
  • Validation- Provide warnings for transferred reports whose data source does not pass validation checks.

After adding a table to the canvas, a table can be selected to display the table's action menu. The action menu tools available are as follows:

  • Copy: Copy a related table.
  • Show related tables: Shows the tables joined to the selected table
  • Select columns: Enables you to select columns for the query
  • Add filters: Enables you to add filters on your column selection
  • Remove table: Removes the selected table from the canvas of the query designer

The use of these tools will be covered in later sections.

Data selection and Action Menu tools, as described in the preceding text.

Field Additions

When you have added a table, select the individual fields by checking the appropriate boxes next to the fields to include.

To add fields from a single table, complete the following steps:

  1. Expand the schema you are using in the report.
  2. Locate the appropriate table.
  3. Drag the table onto the canvas.
  4. Choose the table in the selected data area. An action menu will appear.
  5. Choose the Select Columns button.
  6. Select the fields you wish to include in the query.
  7. Choose outside the Select Column pane to close the window.

Alternatively, you can expand the tables in the Available Data section and double-click the fields (columns) you want to select. To confirm whether the field has been selected, check the color of the field name in the Available Data section. The color of a selected field appears blue.

Screenshot of the Select Column options.

Note

After you add a table on the canvas, only the tables joined or related to that table appear in the Available Data section.

Field Indicators

When you are adding fields to your query, you might see some indicators/call-outs on the fields, in particular:

  • Lock icon: It means you do not have the role-based permissions required to access the data in that field. You will still be able to select the field in the query; however, you will not see any data in that field. When other users run the report, they see data based on their role-based permissions. To resolve the constraint, check and update the data access permissions granted to you for the particular fields in that module.
  • Shield icon: It means that the field includes sensitive information. If you add sensitive columns to the report, the read access logs are generated each time someone uses (previews, schedules or generates) the report. You must also include the context field (such as User Sys ID) to the report to enable the read access logging.

Note

When you select a sensitive personal data field for your query, the system may automatically select a dependent unique identifier field such as User ID, Person ID, or Candidate ID even if it's from an auto-joined table. This is required for read access logging in Story reports.

Field Removal

You may accidentally add a field, or a field is no longer required in the story. You can remove those fields.

If you need to remove a table or field, you can do so with the action menu for the table.

To remove a field, complete the following steps:

  1. Choose the table in the selected data area. An action menu will appear.
  2. Choose the Select Columns button.
  3. Deselect the fields you want to remove from your query.
  4. Choose outside the Select Column pane to close the window.

Table Removal

To remove a table, complete the following steps.

  1. Choose the table in the selected data area. An action menu will appear.
  2. Choose the Remove Table button.
  3. Choose Remove to confirm the removal of the table.

Field Relabeling

In many cases, tables may have fields with similar names.

Under certain circumstances, you may want to change the label of a field. For example, you may select the Last Name column from two different tables such as Basic User Information and Manager.

In that case, relabel the field to distinguish between the two fields, such as using Manager’s Last Name.

The column Overview screen with the Column Description fields highlighted.

To relabel a field, complete the following steps.

  1. In the Data section of the toolbar, choose the Calculated Column button.
  2. In the column overview dialog, update the Column Description for the fields.
  3. Choose OK.

SAP SuccessFactors Learning Data in Data Sources

If your organization uses SAPSuccessFactors Learning, you can use Stories to report on the learning data. However, this will add an additional step when creating a new Data Source.

Dashboard for Learning Compliance Analysis: 6 curricula, 17 unique courses, 103,300 total courses assigned, 2,792 avg courses per country. Pie chart shows 76% compliant, 23.5% non-compliant, 0.07% 40 days compliant.

For organizations with SAP SuccessFactors Learning and Stories, when you create a new data source, you will be prompted to choose a connection to the appropriate data model. The data model defines what schemas, tables, and fields can be used within the query:

  • SAP SuccessFactors Reporting (SAPSFSFREP): All schemas that are NOT from SAP SuccessFactors Learning
  • SAP SuccessFactors Learning (SAPSFSFLMS): ONLY the SAP SuccessFactors Learning Schemas
Open the list and select an SAP Live Connection.

The process to create the data source using learning data is the same. Only the schemas, tables, and fields are different.

To learn about the Learning schemas supported for Story reports, refer to the Available Data (Schema) in Story Reports topic in the document,Available Data (Schema) in Story Reports | SAP Help Portal , on the SAP Help Portal.

The Query Designer interface showing a connection between User and Learning History Summary tables and a list of available data options.

Recommendations for Data Sources in a Story

SAP SuccessFactors has the following recommendations for data sources in a story:

  • Maximum number of Fields in Data Source: 120
  • Maximum number of Tables in Data Source: 25-30 including Auto Joins Tables in the tables selected in Query Designer
  • Maximum number of Data Sources in Story: The suggested number is 2 if columns in the data source are less than 100, or else 1 if the data source has more than 100 and less than 120 columns.
  • Maximum number of columns in a story across multiple data sources that are limited to120 fields per data source: 120

Query Validation Checks

If the configuration of the SAP SuccessFactors system changes, or if you import report definitions from a different system, you can end up with reports with Data Sources that are invalid. Therefore, SuccessFactors has integrated a query validation tool into the Query Designer.

When you preview or finalize a query, it triggers some validation checks that help you identify and fix issues in the query, if any exist.

Screenshot of validation errors.

The query validation checks help you to identify the following:

  • Missing Columns (fields): The validation checks identify the fields used in the query (selected columns, filters, and/or calculations) but are unavailable in the system. To resolve the issue, you can either replace the missing field with a valid option or you can delete the missing field.
  • Missing Objects (tables): The validation checks identify the tables used in the query (its fields are included in selected columns, filters, and/or calculations) but are unavailable in the system. To resolve the issue, remove the missing table from your query and remove the fields of the missing table from filters and/or calculations.
  • Missing Permission (Metadata): When a user edits a query with filters, if the user doesn't have data access for any of the fields used in the filters, the query breaks. This validation check identifies such invalid filters that break the query. To resolve the issue, you can remove the invalid filters and save your changes to the query.

When there are missing columns, the steps to resolve the issue vary depending on where the field is used:

  • If a missing field has been selected as a column in the query, the system provides options to either update or remove the field to fix the issue.
  • If a missing field has been in a filter or in a calculation, the system provides details of the missing field and of the entity in which the field has been used. You must manually update the entity to fix the issue.

Note

The validation checks are applicable only in Query Designer, not in the Story Designer. This means that the validation checks are unable to identify the errors in widgets used in the story.

Interaction: Create a New Report and Build an Employee Information Query

Business Example

In this exercise, you will create a new report with a Data Source using the Basic User Information table.

Fields from Related Tables

For most reports, you will need to use more than one table to retrieve the required data.

Tables in the reporting schema can be related to other tables, either within the same schema or in a different schema. After you have added a table to canvas, only the tables joined or related to that table appear in the Available Data section.

You can add related tables either from the Available Data section or through the table action menu. One benefit of the Available Data is that it has a search option.

To add a related table or field from Available Data, complete the following steps:

  1. Navigate or locate the appropriate table/field in the Available Data section.
  2. Double-click it or drag-and-drop the table/field on the query canvas.
  3. You can add additional fields using the same method or using the Select Columns command in the table action menu.

Note

The first table that you add to the query is referred to as the driving table. Each query can only have a single driving table. All tables added to the query must be related to the driving table, either directly or through another related table.

Add a related table or field, as described in the preceding text.

You can also add related tables using the Show Related Tables command from the table action menu. The related schemas and table will appear to the right of the selected tables. Schemas appear as collapsible/expandable Labels, such as 360 Review.

  1. Choose the table in the selected data area.

    An action menu will appear.

  2. Select the Show Related Tables button.
  3. Select the > to expand the schema to show the related tables available.

  4. To add a table, either:

    a. Choose the + icon to add the table without any fields.

    b. Click into the table, then use the Select Columns action menu command to select the columns.

  5. The table is added to the canvas.
Add related tables using the show Related Tables command.

Note

Related tables you add to the canvas might also have related tables. Therefore, a query could involve many tables from multiple schemas.

Currently, your query can include only up to 120 columns, which are selected from a maximum of 30 tables. Your query can retrieve data up to 1,000,000 cells. However, please ensure that the total number of columns from all queries doesn't exceed 180.

Related Tables Video Tutorial

Join Type for Related Tables

After a related table has been added to the canvas, you can adjust the join type between the two tables. Each related table will have a default, which can be overridden by selecting the table join icon.

To adjust the join type, select the table join icon.

Inner Joins

Join Types

Two tables, Global Job Information and Spot Bonus, are sorted by intersecting data using inner join, resulting in shared User IDs, AAA and BBB, shown in the Query Results table with job and bonus details.

Inner Joins show only records that exist in both objects. In this example, employee CCC is not shown in the query results because they do not exist in the Spot Bonus object.

Left Outer Joins

Two tables, Global Job Information and Spot Bonus, are merged using a left outer join, resulting in a Query Results table with combined data for each user ID, including compensation details.

Left Outer Joins show all records from the object on the left and only records that match from the object on the right. In this example, employee CCC is shown in the query results because they exist in the Global Job Information object, however with empty results from the Spot Bonus columns because they do not exist in that object.

Query Designer Change Join Types

To change the join type, complete the following steps:

  1. Choose the table join icon.
  2. Select the appropriate join type.
  3. You can test your results with the Preview Query button.

Interaction: Related Tables in a Query

Business Example

In this exercise you will add additional data from a related table. You will include the Date of Birth from the Basic Personal Information Table.

Summary

Data Source Basics:

A data source is a saved query used in Story Reports, built using the Query Designer tool.

Query Designer Functionality:

Select tables and fields from schemas, preview data, and save queries as data sources for reports.

Field and Table Management:

Add, remove, or relabel fields; adjust join types (inner/outer) between related tables.

Validation and Permissions:

Query validation checks for missing fields/tables; role-based permissions affect data access.

Recommendations and Limits:

Maximum 120 fields per data source, 25-30 tables per query, and 1-2 data sources per story.