This paper discusses processing data from multiple sources through the use of linked Microsoft Excel parameter files or logical data maps (LDMs) that specify the name, type, length, and validation rules for each target variable in a SAS data set or other table structure (e.g. Oracle, DB2, Access, etc.) and the associated source variable information (e.g. source variable name, and type). The LDM also includes the transformation rules that are used to convert the source variable into the target variable. Each LDM is based on a master logical data map to which there is a link for the validation rules. Thus, it’s possible to change the validation rules in the master LDM and have those modifications appear in the subordinate LDMs.
In our case, we examined weather data from North America and Europe to determine their variations.
Using SAS Enterprise Guide, we imported the LDMs and the input data files. After the imports, we created macro variables from the LDM source variables, transformation rules, target validation rules, and target variables.
Our code determines the number of target variables in the current LDM and, using an iterative %do group, applies the source and transformation rule macro variables to create the target variables. After the target variable creation, the validation rule macro variables are applied.
Using this method, it’s possible to change the transformation and validation procedures for specific variables (or add new target variables) without modifying the production code.
Parameter-Driven Data Validation and Transformation Or The Marriage of Microsoft Excel and SAS® Macro Variables to Solve ETL Problems
conference:
Paper Type:
Paper