Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
  4. http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
  5. http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/current/mule-jdbc.xsd
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
  7. http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
  8.  
  9. <configuration doc:name="Configuration">
  10. <expression-language autoResolveVariables="true">
  11. <import class="org.mule.util.StringUtils" />
  12. </expression-language>
  13. </configuration>
  14.  
  15.  
  16. <jdbc:mysql-data-source name="MySQL_Data_Source" user="roor" url="jdbc:mysql://localhost:3306/csv" transactionIsolation="UNSPECIFIED" doc:name="MySQL Data Source" password="1234"/>
  17.  
  18.  
  19. <jdbc:connector name="Database" dataSource-ref="MySQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database">
  20. <jdbc:query key="InsertRecord" value="INSERT INTO "tblFamily"("Title", "FirstName", "LastName") VALUES (#[message.payload[0]],#[message.payload[1]],#[message.payload[2]])"/>
  21. </jdbc:connector>
  22. <flow name="csvFlow1" doc:name="csvFlow1">
  23. <!-- Step 1: CSV file source -->
  24. <file:inbound-endpoint path="C:UsersmasoudyDownloadsCompressedResoes" pollingFrequency="5000" doc:name="Source"/>
  25. <!-- Step 2: Convert between object arrays and strings -->
  26. <object-to-string-transformer doc:name="Object to String"/>
  27. <splitter expression="#[StringUtils.split(message.payload, 'nr')]" doc:name="Splitter"/>
  28. <expression-transformer expression="#[StringUtils.split(message.payload, ',')]" doc:name="Expression"/>
  29. <jdbc:outbound-endpoint exchange-pattern="one-way" queryTimeout="-1" doc:name="Destination" connector-ref="Database" queryKey="InsertRecord"/>
  30.  
  31. </flow>
  32.  
  33.  
  34. </mule>
  35.  
  36. **********************************************************************
  37. * Application: csv *
  38. * OS encoding: Cp1256, Mule encoding: UTF-8 *
  39. * *
  40. * Agents Running: *
  41. * JMX Agent *
  42. **********************************************************************
  43. INFO 2013-04-22 14:55:54,437 [main] org.mule.module.launcher.DeploymentService:
  44. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  45. + Started app 'csv' +
  46. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement