Example using WITSML™ Files (In demo Directory)

This example demonstrates loading sample data describing an oil rig using a Joost STX transformation. The data is in the form of a complex XML file downloaded from energistics.org.

The Wellsite Information Transfer Standard Markup Language (WITSML™) is an oil industry initiative to provide open, non-proprietary, standard interfaces for technology and software to share information among oil companies, service companies, drilling contractors, application vendors, and regulatory agencies. For more information about WITSML™, see http://www.witsml.org.

The oil rig information consists of a top level <rigs> element with multiple child elements such as <documentInfo>, <rig>, and so on. The following excerpt from the file shows the type of information in the <rig> tag.

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet href="../stylesheets/rig.xsl" type="text/xsl" media="screen"?>
  3. <rigs
  4. xmlns="http://www.witsml.org/schemas/131"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6. xsi:schemaLocation="http://www.witsml.org/schemas/131 ../obj_rig.xsd"
  7. version="1.3.1.1">
  8. <documentInfo>
  9. ... misc data ...
  10. </documentInfo>
  11. <rig uidWell="W-12" uidWellbore="B-01" uid="xr31">
  12. <nameWell>6507/7-A-42</nameWell>
  13. <nameWellbore>A-42</nameWellbore>
  14. <name>Deep Drill #5</name>
  15. <owner>Deep Drilling Co.</owner>
  16. <typeRig>floater</typeRig>
  17. <manufacturer>Fitsui Engineering</manufacturer>
  18. <yearEntService>1980</yearEntService>
  19. <classRig>ABS Class A1 M CSDU AMS ACCU</classRig>
  20. <approvals>DNV</approvals>
  21. ... more data ...

The goal is to import the information for this rig into HAWQ.

The sample document, rig.xml, is about 11KB in size. The input does not contain tabs so the relevant information can be converted into records delimited with a pipe (|).

W-12|6507/7-A-42|xr31|Deep Drill #5|Deep Drilling Co.|John Doe|John.Doe@example.com|

With the columns:

  • well_uid text, – e.g. W-12
  • well_name text, – e.g. 6507/7-A-42
  • rig_uid text, – e.g. xr31
  • rig_name text, – e.g. Deep Drill #5
  • rig_owner text, – e.g. Deep Drilling Co.
  • rig_contact text, – e.g. John Doe
  • rig_email text, – e.g. John.Doe@example.com
  • doc xml

Then, load the data into HAWQ.