Guest User

Untitled

a guest
Nov 27th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.18 KB | None | 0 0
  1.  
  2. #JDBCFetch - A tool for taking data out of a database and placing it into a Harvester silo for further processing
  3. #-----
  4. #Detailed description of tool
  5.  
  6. #Version - The version number is provided so that the classpath will be
  7. # referring to the correct jar file during execution.
  8. # If it is set to an incompatable version the resulting effects to
  9. # the data harvested are unpredictable.
  10. Version=1.2beta
  11.  
  12. #CLASSPATH_OPT - This option is added to the HARVESTER_JAVA_OPTS so
  13. # that the intended classpath is included.
  14. # If it is changed ensure that it continues to include the data
  15. # within the required jar file dependencies. Without those
  16. # dependencies the code will not execute.
  17. CLASSPATH_OPT="-cp lib/d2rmap-V03.jar:bin/harvester-${Version}.jar:bin/dependency/*"
  18.  
  19. #JDBCdriver - This would be the driver class which the JDBCFetch will use
  20. # To communicate with the database. The driver must agree with the
  21. # type of database, otherwise the communication between the harvester
  22. # and the database will be unclear.
  23. # Some examples of JDCBdriver classes are:
  24. # org.h2.Driver used to communicate with H2 style databases
  25. JDBCdriver="org.h2.Driver"
  26.  
  27. #JDBCconnection - The connection string is used by JDBC fetch to get a
  28. # connection to a particular database.
  29. # The format of the string is in 3 parts divided by colons
  30. # part one - "jdbc" signifies its a jdbc connection
  31. # part two - "h2" is the driver specfic format that the databse is in
  32. # part three - The location of the database storage file
  33. JDBCconnection="jdbc:h2:harvested-data/example-jdbc/clone/store"
  34.  
  35. #JDBCusername and JDBCpassword are the username and password to use when
  36. # accessing the given database. These must be valid otherwise the
  37. # harvest run will not have access to the database.
  38. # By default we use "sa" for system administrator and a blank password.
  39. JDBCusername="sa"
  40. JDBCpassword=""
  41.  
  42. #The beginning of the first table set for information gathering
  43. # each table set has values that end with a number. The script may need
  44. # to be altered in order to make sure that each table set is used.
  45. # A table set is a series of values
  46. #JDBCtablename - This is the name of the table to be harvested from. It needs
  47. # to agree with an existing table or view within the database specificed
  48. # by the JDBCconnection.
  49. JDBCtablename1="people"
  50.  
  51. #JDBCid - This is a field or set of fields within the table which are distinct
  52. # and are able to differentiate between entries. Any of the fields can be
  53. # placed in this value.
  54. # A composite identifier can be created if a single field is not distinct.
  55. # Composite identifiers are created by using comma separated tablenames
  56. # instead of a single tablename.
  57. JDBCid1="UID"
  58.  
  59. #JDBCquery - The JDBCFetch can use a SQL query to pull information out of the
  60. # Database. The format of the query is standard and is placed here as a
  61. # series of concatnated statements. The separate statements are placed in
  62. # order to give line-breaks for editing.
  63. # This query assembles the information related to people from the people
  64. # table. The AS statements ensure that the data is properly named for
  65. # the translation step to be able to translate the data into properly
  66. # formed RDF
  67. JDBCquery1="SELECT"
  68. JDBCquery1=$JDBCquery1 "emp.person_id AS UID,"
  69. JDBCquery1=$JDBCquery1 "emp.first_name AS FNAME, "
  70. JDBCquery1=$JDBCquery1 "emp.last_name AS LNAME, "
  71. JDBCquery1=$JDBCquery1 "emp.middle_name AS MNAME, "
  72. JDBCquery1=$JDBCquery1 "emp.prefix_name AS PRENAME, "
  73. JDBCquery1=$JDBCquery1 "emp.suffix_name AS SUFNAME, "
  74. JDBCquery1=$JDBCquery1 "emp.full_name AS FULLNAME, "
  75. JDBCquery1=$JDBCquery1 "emp.official_name AS BUSNAME, "
  76. JDBCquery1=$JDBCquery1 "emp.pref_title AS TITLE, "
  77. JDBCquery1=$JDBCquery1 "emp.email_address AS EMAIL, "
  78. JDBCquery1=$JDBCquery1 "emp.work_phone AS PHONE, "
  79. JDBCquery1=$JDBCquery1 "emp.work_fax AS FAX, "
  80. JDBCquery1=$JDBCquery1 "login.login_name AS NETID "
  81. JDBCquery1=$JDBCquery1 "FROM person AS emp "
  82. JDBCquery1=$JDBCquery1 "LEFT JOIN user AS login ON "
  83. JDBCquery1=$JDBCquery1 " emp.person_id = login.person_id AND login.expired = 0 "
  84. JDBCquery1=$JDBCquery1 "WHERE "
  85. JDBCquery1=$JDBCquery1 " emp.publish_ok = 1"
  86.  
  87. #JDBCquery - The JDBCFetch can use a SQL query to pull information out of the
  88. # Database. The format of the query is standard and is placed here as a
  89. # series of concatnated statements. The separate statements are placed in
  90. # order to give line-breaks for editing.
  91. # This query assembles the information related to positions from the positions
  92. # table. The AS statements ensure that the data is properly named for
  93. # the translation step to be able to translate the data into properly
  94. # formed RDF
  95. JDBCtablename2="positions"
  96. JDBCid2="UID,TYPE,DEPTID,STARTDATE"
  97. JDBCquery2="SELECT"
  98. JDBCquery2=$JDBCquery2 "emp.person_id AS UID,"
  99. JDBCquery2=$JDBCquery2 "pos.type_id AS TYPE, "
  100. JDBCquery2=$JDBCquery2 "pos.dept_id AS DEPTID, "
  101. JDBCquery2=$JDBCquery2 "pos.start_date AS STARTDATE, "
  102. JDBCquery2=$JDBCquery2 "code.value AS WORKTITLE "
  103. JDBCquery2=$JDBCquery2 "FROM job AS pos "
  104. JDBCquery2=$JDBCquery2 "INNER JOIN person AS emp ON "
  105. JDBCquery2=$JDBCquery2 " pos.person_id = emp.person_id "
  106. JDBCquery2=$JDBCquery2 "INNER JOIN person AS emp ON "
  107. JDBCquery2=$JDBCquery2 " pos.person_id = emp.person_id "
  108. JDBCquery2=$JDBCquery2 "WHERE "
  109. JDBCquery2=$JDBCquery2 " pos.type_id IN (121,122,254,392,393) AND"
  110. JDBCquery2=$JDBCquery2 " emp.publish_ok = 1"
  111.  
  112. #JDBCquery - The JDBCFetch can use a SQL query to pull information out of the
  113. # Database. The format of the query is standard and is placed here as a
  114. # series of concatnated statements. The separate statements are placed in
  115. # order to give line-breaks for editing.
  116. # This query assembles the information related to organizations from the
  117. # organizations table. The AS statements ensure that the data is properly
  118. # named for the translation step to be able to translate the data into
  119. # properly formed RDF.
  120. JDBCtablename3="organizations"
  121. JDBCid3="DEPTID"
  122. JDBCquery3="SELECT"
  123. JDBCquery3=$JDBCquery3 "dept.dept_id AS DEPTID,"
  124. JDBCquery3=$JDBCquery3 "dept.dept_name AS NAME, "
  125. JDBCquery3=$JDBCquery3 "dept.type_id AS TYPE, "
  126. JDBCquery3=$JDBCquery3 "dept.super_dept_id AS SUPERDEPTID "
  127. JDBCquery3=$JDBCquery3 "FROM department AS dept "
Add Comment
Please, Sign In to add comment