This Blog is all about ETL related Information.It gives information about Datastage ,Informatica,Oracle,SQL,PL/SQL ,Unix,Data warehousing ,Data Modeling and ER Model concepts and FAQ's
Tuesday
Data Stage Job Status Values
The Data Stage Job Status values can be found in
Friday
DataStage Version 8 on Information Server
New Stages in DataStage Version 8
Monday
When to choose Server or Parallel Data stage job
- The choice of server or parallel depends upon time to implement, functionality and cost.
- When we have lots of functionality to implement for lower volume and hardware is less and ease of implementation we can go for Server jobs.
- Parallel jobs are costly due to high scale of hardware , difficult to implement, extreme processing capabilities for absurd volumes with vast array of operators for high-performance manipulation.
- When the data volume is less it is better to go for Server job as parallel jobs can have a longer start up time.
- When data volume is high, it is better to choose parallel job than server job. Parallel job will be a lot faster than server job even if it runs on single node. The obvious incentive for going parallel is data volume. Parallel jobs can remove bottlenecks and run across multiple nodes in a cluster for almost unlimited scalability. At this point parallel jobs become the faster and easier option. A parallel sort stage is lot faster than server stage. A Transformer stage in parallel job with the same transformations in server job is faster. Even on one node with a compiled transformer stage, the parallel version was three times faster. On 1 node configuration that does not have a lot of parallel processing also we can still get big performance improvements from an Enterprise Edition job. The improvements will be multiplied 10 or more than that if we work on 2CPU machines and two nodes in most stages.
- Parallel jobs take advantage of both pipeline parallelism and partitioning parallelism.
- We can improve the performance of server job by enabling inter process row buffering. This helps stages to exchange data as soon as it is available in the link. IPC stage also helps passive stage to read data from another as soon as data is available. In other words, stages do not have to wait for the entire set of records to be read first and then transferred to the next stage. Link partitioner and link collector stages can be used to achieve a certain degree of partitioning parallelism.
- Look up with sequential file is possible in parallel jobs and not possible in server jobs.
Tuesday
Datastage DsAdmin Questions related to Unix
Wednesday
Datastage DsAdmin Questions
- Have you created User groups and Users? $ group -c ourgroup $ group -m groupname userid $ group -o groupname userid $ group -O groupname userid # adduser --ingroup grname userid
- How to kill the process? $ ps $kill -9/-1 PID
- How to Unlock DataStage Jobs if the job is used by the another user or Hanged out?
su - dsadm {enter your password for dsadm, else you can use root} cd `cat /.dshome` . ./dsenv bin/uvsh list.readu {find the row that shows your lock, look over to the USERNO column and get that number} UNLOCK USER nnnnn ALL QUIT
- CD To $DSHOME/../Projects/ProjectName
- Type the Following and press Enger.
INSERT INTO VOC (F0, F1, F2, F3, F4, F5) VALUES ('UNLOCK','V', 'list_readu','E','BV','unlock')
- cd ${INSTALLATION_PATH}/DSEngine/bin
- ./dsenv
- ./uv -admin -stop
- How to Add Unlock command to Vocabulary file(VOC)? CD To $DSHOME/../Projects/ProjectName INSERT INTO VOC (F0, F1, F2, F3, F4, F5) VALUES ('UNLOCK','V', 'list_readu','E','BV','unlock')
- What is the command to Restart the DataStage Server? What is UV over there
- Tell me some problems you may encounter when the DataStage running on UNIX platforms? 1. Running out of file units, 2. Running out of memory(Heap error), 3. open connection, 4. ODBC connection problems.
- What is Heap Error? Anything to do with "heap" is about allocation of memory resources. Either install more memory in your server(s), or reduce overall demand for memory, perhaps by running less no. of jobs simultaneously, or by running on a configuration with less no. of processing nodes.
- What happens when you shut down the Datastage server without closing all client connections? There may be an open connection from a Datastage client, Without shutting down the client processes, sockets are released on most platforms after the timeout period of about 6 - 10 minutes, depending on system tuning.
- Which command is used to know whether the datastage server is running or not? ps -ef | grep dsrpc (this process should not be running when DataStage has stopped successfully) OR #netstat | grep dsrpcd
- How do you restart the failure job in sequencer using Administrator or Director? Sequence(Add check points on failure)
Sunday
Data Stage Designer Performance Tuning in Server jobs
- In derivations, instead of calling routines, implement the logic in the derivation. This eliminates the overhead of the procedure call.
- Implement the logic in a stage variable and then point the stage variable to the actual field.
- Use Transforms rather than using routines.
- While using the ODBC stage adjust the rows per transaction setting. Try setting to 1000, 5000, or 10000.
- Adjust the array size setting. Try setting to 10, 100, or 1000.
- If output rows are Inserts or Appends and not Updates, consider using a native bulk loader.
- Eliminate unused columns.
- Eliminate unused references.
- Minimize using the stages like SORT, AGGREGATE which minimizes the performance of the job.
- If more transformer Stages are used in sequence in a job, Enable the inter process buffering in the job properties or use the InterProcess Stage between Transformers which improves the performance.
- Direct output to a sequential file compatible with the bulk loader. Then invoke the bulk loader using an after-job subroutine. The bulk loader for Oracle is SQLLDR.
- Avoid using 'like' operator in user defined queries in ODBC stages
- Avoid using stored procedures until and unless the functionality cannot be implemented in Data Stage jobs.
- Tips while creating routines
- Use variables in the routines.
- Assign empty values to the variables before using them.
- Routines will return Ans as return value. Instead of using ANS multiple times, use a variable .Implement the logic in that variable and assign that variable to ANS.
- For Example: Ans = ''
If ( Len(Trim(Name)) > 45) Then Ans = Ans : ',' : '24356' End
Ans = Ans
The above logic can be implemented using
ErrStr = ''Ans = ''
If ( Len(Trim(Name)) > 45) Then ErrStr := ',24356'End Ans = ErrStr
Wednesday
Useful Guidelines in Designing Ascential Data Stage Server Jobs
- Logically create the folders / subfolders on the file server so that the files can be placed and accessed from the relevant folders/subfolders.
- Group the Jobs logically into various categories / Subcategories.
- Comment the Jobs by using Annotation stage which tells the users, the functionality implemented in the job.
- Give descriptions in the properties of the stages used so that others can identify the functionality implemented in it.
- Name passive stages with the Table/File Names they access in it. 6. Name active stages to match their function.
- Name links to express the direction and type of data flowing through them.
- Use job parameters where ever it is required. This makes the process easy while moving into production.
- While using ODBC stages remember to remove the derivations in the columns.
- Use ODBC stage to access relational tables.
- Move constraints from Transform stages to input stage WHERE clauses, to reduce the number of rows the job has to process.
- Use the in-built functions present in Data Stage rather than creating a new routine for implementing the same logic as of in-built function.
- Open the transformer stage
- Copy the columns from source(ODBC ) to target(Sequential File)
- Delete the columns from source(ODBC)
- Copy all the columns from target to the source.
- Close the transformer.
- Now we find that all the derivations are cleared from ODBC stage.
While using Reference Lookups
- Compare the number of input rows with the number of rows in the reference table. If the reference table is smaller than the number of input rows, pre-load the reference table into a hash file and then reference the hash file.
- Consider moving reference lookups to a join within the input stage. All columns used to join the tables should be indexed to maximize performance.
- If the number of rows in a hashed file is small, consider Pre-loading the file into memory by checking the Pre-load file to memory checkbox in the Hash File stage.
- Remove unused columns from transforms. This does not apply to columns in sequential files or output to hash files.
- While mapping the input records with the Hash Look ups, remember that the fields getting mapped should be of same data type and of same length.
- While loading the hash files, trim the data.
Saturday
Duke Consulting Tips & Tricks for Datastage
- Get row counts on all jobs in a sequence, all jobs or just one job.
- Installing EtlStats.
- Sample reports from EtlStats. Sample records for ETL_QA tables.
- Jobs and routines to extract information about jobs.
- Documentation for routines
- Routines for Generate create table scripts from DS_METADATA.,Display metadata mismatches,Put a standard long description on a job. ,Get last warning message from log file,Get shell based on OS (DOS or SH),Compare first row of sequential file with column names to lengths.
- Backup all DataStage projects on a server.
- Korn Shell, Perl, Universe and Vi help files.
- Xml Best Practices
- Tech Tips From Ascential now IBM
Tuesday
Datastage Basic Commands to release jobs,Shutdown and retart Datastage client cmmands and basic Unix commands
Monday
Using Data Stage Job Parameters,Using Data Stage After/before job routines,Data Stage Job Control Functions
Example for using Parameters in Passive Stages:
Parameter Need pound (#) signs
Using Job Parameters in Transformer stages:
Parameters are Inserted from Operand menu
Example for Running Jobs with Parameters:
Enter values for parameters
Before and After Routines Can be called:
- Run before or after a job
- Run before or after a transformer stage
- Built-in Before/After routines can used to call ExecDos , ExecShell ,ExecTCL
- Can define custom routines
Examplle for Using Before and After Routines in a job :
In this example dos command is called an its value is mentioned in Input value using job parameters.
Job Control Functions can be used:
- Use to control jobs and obtain project and job information
- Can be executed In Job control tab of Job Properties window
- Can be executed Within DS routines
- Can be executed Within derivations
- DSAttachJob
- DSSetParam
- DSRunJob
- DSWaitForJob
- DSGetProjectInfo
- DSGetJobInfo
- DSLogInfo
Exampe for Creating a Controlling Job or calling a jb within a job: