Page tree
Skip to end of metadata
Go to start of metadata

Use the following guidelines for developing custom ETLs.

Language bindings

The ETL Development API supports two programming languages – Perl, and Java. These two languages are contrasted in the following table.



  • Robust, widely used language for data extraction
  • Heavily integrated with the UNIX OS shell
  • Ideal for parsing text files, including very large ones
  • Lightweight OS execution time
  • The CPAN (Comprehensive Perl Archive Network) community offers
    a lot of ready open-source libraries to extract data from a lot of different sources
  • A Perl based ETL Development API is the default (and most frequently used) choice for BMC TrueSight Capacity Optimization ETL development, as the range of integrations available for Perl is the widest.

Java is preferred in the following situations:

  • If the data source you are integrating offers only a Java Application Programming Interface for data extraction. For example, a Java Application Programming Interface based on Enterprise JavaBeans (EJB) calls.
  • When using RESTful Web Services – because the Java client is a lot more robust, and reliable compared to Perl when it comes to web services.


The names of classes and methods used in Perl are identical to those used in Java.

Coding rules and conventions

The following coding rules and conventions must be adhered to at all times:

  • In Perl-Object Oriented (Perl-OO) programming:
    • An object class can be represented by a module, and so, referring to it as a class or a module would mean referring to the same thing.
    • If a module is accessed only statically and never instanced, it is called a static module.
    • A sub within a class module has the same meaning as that of a class method; and will be referred to as a method.
    • Variables are declared explicitly. As a rule, use the use strict; pragma (compiler directive for Perl) at the very beginning of the code.
    • Inside sub-definitions declare all the parameters used by the sub, immediately after the sub:


      sub mySub
      my ($firstpar,$secondpar) = @_;
    • Inside object method definitions, use the $self variable for object instance reference. This is also a quick way to distinguish dynamic methods from static ones, as static methods do not have the $self declaration:


      sub mySub
      my $self = shift;
    • Use the underscore (_) prefix for private methods:


      sub _myPrivateSub
    • Use the arrow (->) notation for dynamic method calls, and the double colon (::) notation for static method calls:


      my $a = $objectinstance->dynamicMethod();
      my $b = MyModule::myStaticMethod();
    • Explicitly use complete names of external modules in object constructors:


      my $a = new MyFolder::MyModule()