Bulk export of the shell script for Informatica Object

Source: Internet
Author: User
Tags server port

#!/bin/bash #-----------------------------------------------------------------------# Script name:inf_impobj.sh# purpose:to batch export mappings or workflows to XML files # Created by:indifferent_to# date:2014-11-26 #------------- ---------------------------------------------------------function Usage {cat <<eouusage:inf_impobj.sh-l < List_file>-D <output_folder>-w/-m/-s/-t <user_name>eouexit 1}repository= "repository name" domain= " Repository domain "host=" Informatica Server host name "port=" Informatica Server port number "_user_name=_password=_obj_ type=mappinglist_file=output_folder=if [!-n "$"]; Thenusageelsewhile truedocase $ in-l) List_file=$2shift 2;; -d) output_folder=$2shift 2;; -W) _obj_type=workflow_user_name=$2break;; -s) _obj_type= "source" _user_name=$2break;; -T) _obj_type= "target" _user_name=$2break;; -m) _user_name=$2break;; *) if [!-n "$"];        Thenbreak;        Usageelse echo "Invalid argument"; Break;usagefi;; EsacdonefipmrEP Connect-r $repository-H $host-O $port-n $_user_name-s $domainif [$-ne 0]; Thenecho "Can not connect to the Informatica repository!" Exit 1; Firow_count= ' cat $list _file|wc-l ' success=0fail=0for ((row=1;row<= $row _count;row++)) doobject_name= ' Sed-n ${row} ' P ' $list _file ' object_name= ' echo $object _name|sed ' s/\\r//g ' #pmrep objectexport-n $object _name-o $_obj_type-m-F Clie Nt_delpdw-s-b-r-U ${output_folder}/${object_name} ". xml" >>infa_expobj.logpmrep objectexport-n $object _name-o $_obj_type-m-F client_delpdw-b-U ${output_folder}/${object_name} ". xml" >>infa_expobj.logif [$?-eq 0]; Thenlet success= $success +1 echo "${object_name} export successfully!" Elselet fail= $fail +1echo "${object_name} fail to export." fi#if [_obj_type= "Sourcce"]; Then#new_object_name= ' echo $object _name|sed ' s/flatfile.//g ' #mv ${output_folder}/${object_name} '. xml ' ${output_ Folder}/${new_object_name} ". xml" #fidoneecho "$success success; $fail fail"

Bulk export of the shell script for Informatica Object

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.