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 date functions


Correctly dealing with dates and time is critically important in data warehouses. In the end, you should understand that this is one of the most important attributes in a majority of fact tables in your DWH, which defines the "position" of your data records. Lots of reports are filtering data by date-time fields before performing data aggregation. This is probably why Data Services has a decent amount of date functions, allowing a variety of operations on date-time variables and table columns.

Data Services supports the following date data types: date, datetime, time, and timestamp. They define what part of time units are stored in the field:

  • date: This stores the calendar date

  • datetime: This stores the calendar date and the time of the day

  • time: This stores only the time of the day without the calendar date

  • timestamp: This stores the time of the day in subseconds

How to do it…

Generating current date and time

Here is a script that can be included in your current script...