Advertisement
uniblab

Untitled

Jun 29th, 2017
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.58 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <WorkOrder xmlns="http://Icod.Wod" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://Icod.Wod schema0.xsd"
  3.     jobName="SalesForce Updates"
  4.     emailTo="Timothy J. Bruce &lt;none@example.com&gt;"
  5. >
  6.     <steps>
  7.         <fileImport connectionStringName="SalesForce" updateBatchSize="20" tableName="SF_DataLoad_ErrorLog" namespace="dbo">
  8.             <columnMapping>
  9.                 <map from="%wod:FileName%" to="FileName" />
  10.                 <map from="Error" to="Error" />
  11.                 <map from="Id" to="Id" />
  12.                 <map from="CONTACTID" to="ContactId" />
  13.                 <map from="EMPLID__C" to="EmplId" />
  14.                 <map from="NETID__C" to="NetId" />
  15.             </columnMapping>
  16.             <source xsi:type="delimitedFile" path="\\jgsm-sql01\D$\SF_Downloads\Errors" name="*.Error.txt" fieldSeperator="44" />
  17.         </fileImport>
  18.         <dbCommand connectionStringName="SalesForce" commandText="delete from dbo.SF_DataLoad_ErrorLog where dbo.TrimToNull( [Error] ) is null" />
  19.  
  20.         <fileOperation xsi:type="mkDir" path="\\jgsm-sql01\D$\SF_Downloads\Errors\Archive\%wod:DateTime-yyyy%\%wod:DateTime-MM%" />
  21.         <fileExport connectionStringName="SalesForce"
  22.                 commandText="select WhenLoaded, [FileName], Count( [Error] ) as ErrorCount from dbo.SF_DataLoad_ErrorLog where ( ( [Error] is not null ) and ( WhenLoaded = Cast( GetDate() as date ) ) ) group by [FileName], [WhenLoaded]"
  23.         >
  24.             <destination xsi:type="delimitedFile" path="\\jgsm-sql01\D$\SF_Downloads\Errors\Archive\%wod:DateTime-yyyy%\%wod:DateTime-MM%" name="ErrorSummary.csv" fieldSeperator="44" writeIfEmpty="false" >
  25.                 <columns>
  26.                     <column name="WhenLoaded" formatString="{0:d}" />
  27.                 </columns>
  28.             </destination>
  29.         </fileExport>
  30.         <email
  31.             subject="%wod:JobName%: error summary"
  32.             sendIfEmpty="false"
  33.             to="%wod:EmailTo%"
  34.         >
  35.             <attachments>
  36.                 <attach path="\\jgsm-sql01\D$\SF_Downloads\Errors\Archive\%wod:DateTime-yyyy%\%wod:DateTime-MM%" name="ErrorSummary.csv" />
  37.             </attachments>
  38.         </email>
  39.         <fileOperation xsi:type="deleteFile" path="\\jgsm-sql01\D$\SF_Downloads\Errors\Archive\%wod:DateTime-yyyy%\%wod:DateTime-MM%" name="ErrorSummary.csv" />
  40.  
  41.         <fileOperation xsi:type="mkZip" path="\\jgsm-sql01\D$\SF_Downloads\Errors\Archive\%wod:DateTime-yyyy%\%wod:DateTime-MM%" name="%wod:DateTime-yyyy-MM-dd%T%wod:DateTime-HHmmss%.zip" truncateEntryName="true" writeIfEmpty="false">
  42.             <source path="\\jgsm-sql01\D$\SF_Downloads\Errors\" name="*.Error.txt" />
  43.         </fileOperation>
  44.  
  45.         <fileOperation xsi:type="deleteFile" path="\\jgsm-sql01\D$\SF_Downloads\Errors\" name="*.Error.txt"/>
  46.     </steps>
  47. </WorkOrder>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement