Book Image

SAP Data Services 4.x Cookbook

Book Image

SAP Data Services 4.x Cookbook

Overview of this book

Want to cost effectively deliver trusted information to all of your crucial business functions? SAP Data Services delivers one enterprise-class solution for data integration, data quality, data profiling, and text data processing. It boosts productivity with a single solution for data quality and data integration. SAP Data Services also enables you to move, improve, govern, and unlock big data. This book will lead you through the SAP Data Services environment to efficiently develop ETL processes. To begin with, you’ll learn to install, configure, and prepare the ETL development environment. You will get familiarized with the concepts of developing ETL processes with SAP Data Services. Starting from smallest unit of work- the data flow, the chapters will lead you to the highest organizational unit—the Data Services job, revealing the advanced techniques of ETL design. You will learn to import XML files by creating and implementing real-time jobs. It will then guide you through the ETL development patterns that enable the most effective performance when extracting, transforming, and loading data. You will also find out how to create validation functions and transforms. Finally, the book will show you the benefits of data quality management with the help of another SAP solution—Information Steward.
Table of Contents (19 chapters)
SAP Data Services 4.x Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using math functions


Data Services has a standard set of functions available to perform mathematical operations. In this recipe, we will use the most popular of them to show you what operations can be performed on numeric data types.

How to do it…

  1. Create a new job and name it Job_Math_Functions.

  2. Inside this job, create a single dataflow called DF_Math_Functions.

  3. Import the FactResellerSales table in your DHW datastore and add it to the dataflow as a source object.

  4. Add the first Query transform after the source table and link them together. Then, open it and drag two columns to the output schema: PRODUCTKEY and SALESAMOUNT. Specify the FACTRESELLERSALES.PRODUCTKEY = 354 filtering condition in the WHERE tab:

  5. Add the second Query transform and rename it Group. Here, we will perform a grouping operation on the product key we selected in the previous transform. To do this, add the PRODUCTKEY column in the GROUP BY tab and apply the sum() aggregate function on SALESAMOUNT in the Mapping tab:

  6. Finally...