Advertisement
uniblab

Untitled

Mar 21st, 2018
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.66 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <WorkOrder xmlns="http://Icod.Wod" xsi:schemaLocation="http://Icod.Wod \\someServer\Icod.Wod\schema0.xsd"
  3.     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.     jobName="SalesForce Data Pull"
  5.     emailTo="foo@example.com, bar@example.com"
  6. >
  7.     <!--
  8.     emailTo="foo@example.com"
  9.     emailTo="foo@example.com, bar@example.com"
  10.     -->
  11.     <steps>
  12.         <fileOperation xsi:type="mkDir" path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" />
  13.  
  14.         <dbOperation xsi:type="command" connectionStringName="SalesForce" commandText="delete from dbo.SF_DataLoad_ErrorLog" commandTimeout="180" />
  15.         <dbOperation xsi:type="fileImport" connectionStringName="SalesForce" updateBatchSize="20" tableName="SF_DataLoad_ErrorLog" namespace="dbo" commandTimeout="180">
  16.             <columnMapping>
  17.                 <map from="%wod:FileName%" to="FileName" />
  18.                 <map from="EMPLID__C" to="EmplId" />
  19.                 <map from="NETID__C" to="NetId" />
  20.             </columnMapping>
  21.             <source xsi:type="delimitedFile" path="\\someServer\SF_Downloads\Errors" name="*.Error.*" fieldSeperator="44" />
  22.         </dbOperation>
  23.         <dbOperation xsi:type="fileExport" connectionStringName="SalesForce"
  24.             commandText="select WhenLoaded, [FileName], Count( [Error] ) as ErrorCount from dbo.SF_DataLoad_ErrorLog where ( ( [Error] is not null ) and ( '' != [Error] ) ) group by [FileName], [WhenLoaded]"
  25.             commandTimeout="180"
  26.         >
  27.             <destination xsi:type="delimitedFile" path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorSummary.csv" fieldSeperator="44" writeIfEmpty="false" >
  28.                 <columns>
  29.                     <column name="WhenLoaded" formatString="{0:d}" />
  30.                 </columns>
  31.             </destination>
  32.         </dbOperation>
  33.         <dbOperation xsi:type="fileExport" connectionStringName="SalesForce"
  34.             commandText="select * from dbo.SF_DataLoad_ErrorLog where ( ( [Error] is not null ) and ( '' != [Error] ) )"
  35.             commandTimeout="180"
  36.         >
  37.             <destination xsi:type="delimitedFile" path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorDetail.csv" fieldSeperator="44" writeIfEmpty="false" >
  38.                 <columns>
  39.                     <column name="WhenLoaded" formatString="{0:d}" />
  40.                 </columns>
  41.             </destination>
  42.         </dbOperation>
  43.         <email
  44.             subject="%wod:JobName%: error summary"
  45.             sendIfEmpty="false"
  46.             to="%wod:EmailTo%"
  47.         >
  48.             <attachments>
  49.                 <attach path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorSummary.csv" />
  50.                 <attach path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorDetail.csv" />
  51.             </attachments>
  52.         </email>
  53.         <fileOperation xsi:type="deleteFile"
  54.             path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorSummary.csv"
  55.         />
  56.         <fileOperation xsi:type="deleteFile"
  57.             path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%" name="ErrorDetail.csv"
  58.         />
  59.         <dbOperation xsi:type="command" connectionStringName="SalesForce" commandText="delete from dbo.SF_DataLoad_ErrorLog" commandTimeout="180" />
  60.  
  61.         <fileOperation xsi:type="mkZip" truncateEntryName="true" writeIfEmpty="false" move="true"
  62.             path="\\someServer\SF_Downloads\Errors\Archive\%wod:DateTime{yyyy}%\%wod:DateTime{MM}%"
  63.             name="%wod:DateTime{yyyy-MM-dd}%T%wod:DateTime{HHmmss}%.zip"
  64.         >
  65.             <sources>
  66.                 <source path="\\someServer\SF_Downloads" name="debug.log" />
  67.                 <source path="\\someServer\SF_Downloads\Errors" name="*.Error.txt" />
  68.                 <source path="\\someServer\SF_Downloads\Errors" name="*.Error.csv" />
  69.             </sources>
  70.         </fileOperation>
  71.     </steps>
  72. </WorkOrder>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement