This action might not be possible to undo. Are you sure you want to continue?
Introduction to DataStage EE Part 1
What is DataStage?
o Design jobs for Extraction, Transformation, and loading (ETL) o Ideal tool for data integration projects - such as, data warehouses, data marts, and system migrations o Import, export, create, and managed metadata for use within jobs o Schedule, run, and monitor jobs all within DataStage o Administer your DataStage development and execution environments
01/07/09 Sayrite Inc. 4
DataStage Server and Clients 01/07/09 Sayrite Inc. 5 .
6 .Datastage Administrator 01/07/09 Sayrite Inc.
Set user group privileges on the Permissions tab. 7 . and to set project properties. add and delete projects. Use the Administrator Project Properties window to: Set job monitoring limits and other Director defaults on the General tab. Enable or disable server-side tracing on the Tracing tab. Specify a user name and password for scheduling jobs on the Schedule tab. 01/07/09 Sayrite Inc.Datastage Administrator Use the Administrator to specify general server defaults. Specify hashed file stage read and write cache sizes on the Tunables tab.
8 .Client Logon 01/07/09 Sayrite Inc.
9 .DataStage Manager 01/07/09 Sayrite Inc.
10 .DataStage Manager Use the Manager to store and manage reusable metadata for the jobs you define in the Designer. Custom routines and transforms can also be created in Manager. In addition to table and file layouts. This metadata includes table and file layouts and routines for transforming extracted data. 01/07/09 Sayrite Inc. Manager is also the primary interface to the DataStage repository. it displays the routines. transforms. and jobs that are defined in the project.
DataStage Designer 01/07/09 Sayrite Inc. 11 .
12 01/07/09 .DataStage Designer The DataStage Designer allows you to use familiar graphical point-and-click techniques to develop processes for extracting. The Designer provides a "visual data flow" method to easily interconnect and configure reusable components. cleansing. integrating and loading . Sayrite Inc.data into warehouse tables. transforming.
run. and monitor your DataStage jobs. 01/07/09 Sayrite Inc. You can also gather statistics as the job runs. schedule. 13 .DataStage Director Use the Director to validate.
Define data aggregations Compile and debug the job: Designer Run and monitor the job: Director Sayrite Inc.Define data integration · . 14 01/07/09 .Developing in DataStage Define your project's properties: Administrator Open (attach to) your project Import metadata that defines the format of data stores your jobs wil read from or write to: Manager Design the job: Designer · .Define data loads (writes) · .Define data extractions (reads) · ..Define data flows .Define data constraints · .Define data transformations · .
15 .DataStage Projects 01/07/09 Sayrite Inc.
DataStage Projects 01/07/09 Sayrite Inc. 16 .
17 . o Director is used to execute your jobs after you build them. 01/07/09 Sayrite Inc.Review o DataStage Designer is used build and compile your ETL jobs. o Manager is used to execute your Jobs after you build them. o Administrator is used to set global and project properties.
18 .Intro Part 2: Configuring Projects 01/07/09 Sayrite Inc.
Explain how to create and delete projects . 19 .Set EE global properties in Administrator 01/07/09 Sayrite Inc.Module Objectives After this module you will be able to: .Set project properties in Administrator .
20 . 01/07/09 Sayrite Inc. Before you can work in a project you must attach to it (open it).) created in the project.Project Properties Projects can be created and deleted in Administrator. Each project is associated with a directory. Projects are created during installation and after installation using Administrator. Project properties and defaults are set in Administrator. You can set the default properties of a project using DataStage Administrator. metadata. etc. The directory stores the objects (jobs. Recall from module 1: In DataStage all development work is done within a project. custom routines.
21 .Setting Project Properties 01/07/09 Sayrite Inc.
22 .Licensing Tab 01/07/09 Sayrite Inc.
Projects General Tab 01/07/09 Sayrite Inc. 23 .
) The default is the General tab. when it stops. The Auto-purge of job log box tab allows you to specify conditions for purging these events. You can limit the logged events either by number of days or number of job runs.Projects General Tab Click Properties on the DataStage Administration window to open the Project Properties window. When a job is run in Director. you can perform some administrative functions in Director without opening Administrator. events are logged describing the progress of the job. and when it aborts. events are logged when a job starts. There are nine tabs. 24 . For example. The number of logged events can grow very large. (The Mainframe tab is only enabled if your license supports mainframe jobs. If you select the Enable job administration in Director box. 01/07/09 Sayrite Inc.
25 .Environment Variables 01/07/09 Sayrite Inc.
26 .Permissions Tab 01/07/09 Sayrite Inc.
There are three roles of DataStage user: DataStage Developer. 01/07/09 Sayrite Inc. DataStage Operator. This helps to prevent unauthorized access to DataStage projects. who can run and manage released DataStage jobs. UNIX note: In UNIX. All DataStage users must belong to a recognized user role before they can log on to DataStage. who does not have permission to log on to DataStage. 27 . the groups displayed are defined in /etc/group.Permissions Tab Use this page to set user group permissions for accessing and using DataStage. <None>. who has full access to all areas of a DataStage project.
28 .Tracing Tab 01/07/09 Sayrite Inc.
If tracing is enabled. information about server activity is recorded for any clients that subsequently attach to the project. When you enable it. 01/07/09 Sayrite Inc. 29 . This should only be used to diagnose serious problems.Tracing Tab This tab is used to enable and disable server-side tracing. Users with in-depth knowledge of the system software can use it to help identify the cause of a client problem. The default is for server-side tracing to be disabled. users receive a warning message whenever they invoke a DataStage client. This information is written to trace files. Warning: Tracing causes a lot of server system overhead.
30 . you can specify the sizes of the memory caches used when reading rows in hashed files and When writing rows to hashed files. Hashed files are mainly used for lookups and are discussed in a later module. 01/07/09 Sayrite Inc.TunablesTab On the Tunables tab.
Parallel Tab You should enable OSH for viewing .OSH is generated when you compile a job. 01/07/09 Sayrite Inc. 31 .
32 .Intro Part 3: Managing Meta Data 01/07/09 Sayrite Inc.
Import metadata for a sequential file 01/07/09 Sayrite Inc. 33 .Import and export DataStage objects .Module Objectives After this module you will be able to: .Describe the DataStage Manager components and functionality .
It also includes the specific column definitions.What Is Metadata? Metadata is "data about data" that describes the formats of sources and targets. 01/07/09 Sayrite Inc. 34 . if so. This includes general format information such as whether the record columns are delimited and. the delimiting character.
DataStage Manager DataStage Manager is a graphical tool for managing the contents of your DataStage project repository. 01/07/09 Sayrite Inc. but you can create subfolders under each. There are seven main branches. 35 . Select a folder in the project tree to display its contents. The left pane contains the project tree. which contains metadata and other DataStage components such as jobs and routines.
36 . 01/07/09 Sayrite Inc. table..Manager Contents Metadata describing sources and targets: Table definitions DataStage objects: jobs. routines. etc. definitions.
Import and Export
Any object in Manager can be exported to a file Can export whole projects Use for backup Sometimes used for version control Can be used to move DataStage objects from one project to another Use to share DataStage jobs and projects with other developers
In Manager, click "Export>DataStage Components" Select DataStage objects for export Specified type of export: DSX, XML Specify file path on client machine
You can export DataStage objects such as jobs, but you can't export metadata, such as field definitions of a sequential file. (T/F) The directory to which you export is on the DataStage client machine, not on the DataStage server machine. (T/F)
Exporting DataStage Objects
41 .Exporting DataStage Objects 01/07/09 Sayrite Inc.
42 .Import Procedure In Manager. click "lmport>DataStage Components“ Select DataStage objects for import 01/07/09 Sayrite Inc.
Importing DataStage Objects 01/07/09 Sayrite Inc. 43 .
Import Options 01/07/09 Sayrite Inc. 44 .
Metadata Import Import format and column destinations from sequential files Import relational table column destinations Imported as "Table Definitions" Table definitions can be loaded into job stages 01/07/09 Sayrite Inc. 45 .
Sequential File Import Procedure In Manager. 46 . click Import>Table Definitions>Sequential File Definitions Select directory containing sequential file and then the file Select Manager category Examined format and column definitions and edit is necessary 01/07/09 Sayrite Inc.
47 . select the category (folder) that contains the table definition. Select the Format tab to edit the file format specification. 01/07/09 Sayrite Inc.Manager Table Definition In Manager. Click the Columns tab to view and modify any column definitions. Double-click the table definition to open the Table Definition window.
Importing Sequential Metadata 01/07/09 Sayrite Inc. 48 .
49 .Intro Part 4: Designing and Documenting Jobs 01/07/09 Sayrite Inc.
Identify the different types of stages . 50 .List the steps involved in creating a job . and load job .Document your job 01/07/09 Sayrite Inc.Create parameters to make your job flexible .Design a simple extraction.Module Objectives After this module you will be able to: -Describe what a DataStage job is .Describe links and stages .Compile your job .
but can use components from Manager Built using a graphical user interface Compiles into Orchestrate shell language (OSH) 01/07/09 Sayrite Inc.What Is a Job? Executable DataStage program Created in DataStage Designer. 51 .
run. add stages defining data extractions and loads Add Transformers and other stages to defined data transformations Add links defining the flow of data from sources to targets Compile the job In Director. import metadata defining sources and targets In Designer. validate. 52 01/07/09 .Job Development Overview In Manager. and monitor your job Sayrite Inc.
53 .Designer Work Area 01/07/09 Sayrite Inc.
54 .Designer Toolbar 01/07/09 Sayrite Inc.
Tools Palette 01/07/09 Sayrite Inc. 55 .
56 .Adding Stages and Links Stages can be dragged from the tools palette or from the stage type branch of the repository view Links can be drawn from the tools palette or by right clicking and dragging from one stage to another 01/07/09 Sayrite Inc.
Sequential File Stage Used to extract data from. 57 . or load data to. a sequential file Specify full path to the file Specify a file format: fixed width or delimited Specified column definitions Specify write action 01/07/09 Sayrite Inc.
58 .Create New Job 01/07/09 Sayrite Inc.Designer .
59 .Drag Stages and Links Using Palette 01/07/09 Sayrite Inc.
Assign Meta Data Meta data may be dragged from the repository and dropped on a link. 60 . 01/07/09 Sayrite Inc.
Editing a Sequential Source Stage 01/07/09 Sayrite Inc. 61 .
to the output link.Editing a Sequential Source Stage Any required properties that are not completed will appear in red. If the file doesn't exist. Think of a link as like a pipe. 62 . You will be able to view its data using the View data button. Define the output link listed in the Output name box. What flows in one end flows out the other end (at the transformer stage). You are defining the format of the data flowing out of the stage. you will get an error at run time. On the Format tab. you specify a format for the source file. 01/07/09 Sayrite Inc. You are defining the file from which the job will read. that is.
Editing a Sequential Target 01/07/09 Sayrite Inc. 63 .
If you click the View data button. You are defining the format of the data flowing into the stage. 64 01/07/09 . You are defining the file the job will write to. If the target file doesn't exist. you can specify a different format for the target file than you specified for the source file. On the Format tab. that is. you will not (of course!) be able to view its data until after the job runs. Specify whether to overwrite or append the data in the Update action set of buttons.. it will be created. The column definitions you defined in the source stage for a given (output) link will appear already defined in the target stage for the corresponding (input) link. from the input links. DataStage will return a "Failed to open ." error. Define each input link listed in the Input name box. Sayrite Inc..Editing a Sequential Target Defining a sequential target stage is similar to defining a sequential source stage. What flows in one end flows out the other end. Think of a link as like a pipe. The format going in is the same as the format going out. If the file doesn't exist.
Transformer Stage Used to define constraints. 65 . and column mappings A column mapping maps an input column to an output column In this module will just defined column mappings (no derivations) 01/07/09 Sayrite Inc. derivations.
66 .Transformer Stage Elements 01/07/09 Sayrite Inc.
The lower.Transformer Stage Elements There are two: transformer and basic transformer. The top. ignore the Stage Variables window in the top. Both look the same but access different routines and functions. 01/07/09 Sayrite Inc. right pane displays the contents of the stage variables. This will be discussed in a later module. right pane. 67 . right pane displays the contents of the output link. For now. Unresolved column mapping will show the output in red. Notice the following elements of the transformer: The top. left pane displays the columns of the input links. The bottom area shows the column definitions (metadata) for the input and output links.
68 .Create Column Mappings 01/07/09 Sayrite Inc.
69 .Creating Stage Variables Stage variables are used for a variety of purposes: Counters Temporary registers for derivations Controls for constraints 01/07/09 Sayrite Inc.
70 .Result 01/07/09 Sayrite Inc.
Used in directory and file names Parameter values are determined at run time 01/07/09 Sayrite Inc. 71 .Adding Job Parameters Makes the job more flexible Parameters can be: .Used in constraints and derivations .
Shows on the job GUI (work area) 01/07/09 Sayrite Inc.Short and long descriptions .Shows in Manager Annotation stage . 72 .Adding Job Documentation Job Properties .Is a stage on the tool palette .
Job Properties Documentation 01/07/09 Sayrite Inc. 73 .
Annotation Stage on the Palette 01/07/09 Sayrite Inc. 74 .
75 .Annotation Stage Properties 01/07/09 Sayrite Inc.
Final Job Work Area with Documentation 01/07/09 Sayrite Inc. 76 .
01/07/09 77 Sayrite Inc. To compile it.Compiling a Job Before you can run your job. you must compile it. A compile will generate OSH. The Compile Job window displays the status of the compile. . click File>Compile or click the Compile button on the tool bar.
01/07/09 Sayrite Inc. 78 . Click More to retrieve more information about the error.Errors or Successful Message If an error occurs: Click Show Error to identify the stage where the error occurred. This can be lengthy for parallel jobs. This will highlight the stage in error.
79 .Intro Part 5: Running Jobs 01/07/09 Sayrite Inc.
Validate your job .Monitor your job's progress .View job log messages 01/07/09 Sayrite Inc.Set to run options .Module Objectives After this module you will be able to: .Use DataStage Director to runyour job . 80 .
81 .Prerequisite to Job Execution 01/07/09 Sayrite Inc.
validating. 82 . and run jobs Can be invoked from DataStage Manager or Designer Tools > Run Director 01/07/09 Sayrite Inc.DataStage Director Can schedule.
To run a job.Running Your Job This shows the Director Status view. Better yet: Shift to log view from main Director screen. . 01/07/09 83 Sayrite Inc. select it and then click Job>Run Now. Then click green arrow to execute job.
Parameters and Limits 01/07/09 Sayrite Inc. 84 .Run Options .
These include: Verifying that connections to data sources can be made. A certain number of warning messages.Run Options . You can validate your job before you run it. Verifying that SOL statements used to select data can be prepared.Parameters and Limits The Job Run Options window is displayed when you click Job>Run Now. Verifying that files can be opened. Click Run to run the job after it is validated. Validation performs some checks that are necessary in order for your job to run successfully. The Status column displays the status of the job run. 85 . 01/07/09 Sayrite Inc. This window allows you to stop the job after: A certain number of rows.
informational messages. 86 .Director Log View Click the Log button in the toolbar to view the job log. and programgenerated messages. 01/07/09 Sayrite Inc. error messages. warning messages. finishing. The job log records events that occur during the execution of a job. and aborting of a job. These events include control events. such as the starting.
Message Details are Available 01/07/09 Sayrite Inc. 87 .
88 .Row limits .Abort after x warnings 01/07/09 Sayrite Inc.Other Director Functions Schedule job to run on a particular date/time Clear job log Set Director options .