Now that you have a feel for the potential data targets such as dimensions and models, lets head towards the import process. Flat files can be imported to both public dimensions as well as models however the main source of master and transaction data for most customers will be from SAP Systems such as SAP Business Warehouse and SAP S/4HANA. When importing from SAP Systems, the imports can be scheduled. As a matter of fact, dimensions can be imported in a sequence that includes the model import.
As previously discuss in this course, data used in SAC models for stories and analytical applications may need to be modified for reporting and analysis purposes. For example, data from a source system that is imported into an SAC model may have multiple columns for employee names - first name and last name. But for stories and analytic applications, designers may need only one column that combines both first and last names.
Wrangling Functions in a Data Model
When importing data into SAC, the data wrangling options include:
Transformations: You can click on a column or cell and create a transformation. The options are: concatenation, split, extract, replace, change, and filter.
Custom Expression Editor: You can create formulas. This editor has all of the transformation options and more advanced data transformation.
The figure Transformation Example is an example of using the classic wrangling interface.
Custom Expression Editor
Sometimes you may need to use a more robust editor to manipulate data. The Custom Expression Editor provides this functionality.
The figure Formula and Expression Editor Example is an example of using the Formula and Expression Editor interface.
An example of the syntax to add a prefix to a dimension is as follows:
An example of syntax to convert a date field format from 20200315 to 01/15/2020:
CONCAT(SUBSTRING([Posting Date],4,2),CONCAT('/',CONCAT(SUBSTRING([Posting Date] ,6 ,2 ),CONCAT('/',SUBSTRING([Posting Date] ,0 ,4 )))))
Combine Data from Two Sources
Another option for wrangling data includes combining data from two sources.
The figure Wrangling - Combine Data from Two Sources is an example of this concept.
Let's look at an example of data wrangling that combines data from two sources.
Watch this video to learn how to create a new model based on an Excel file.