Skip to main content

Hi there! Shafeeq from Ataccama here. I’m a Software Support Engineer and occasionally I come across issues that are shared among different customers. 

One of those issues is how one can get Ataccama tools to preserve spaces before and/or after certain strings. This might be when trying to perform certain operations using the Column Assigner in the IDE, or in a monitoring project running on the Web App where a DQ rule checks that a field does not have trailing spaces, etc.  

The solution to this problem is simple, in the form of Java VM arguments. These  are typically values that change the behaviour of the Java Virtual Machine (JVM) which is used by our products. Below, I’ll share the solution.  

When this issue arises for a plan, workflow, etc. in the IDE, you may follow the steps below:  

  1. Click on the arrow next to the run button and then click on "Run Configuration".





     
  2. Click on the Runtimes tab and add the following parameter in the VM arguments text box: 
    -Dengine.trimStringValues=false
















    Then click apply and click run.   
  3. Once that’s done, run your plan and you will see that the spaces are now preserved.  

When using DQC in server mode, these parameters are passed in the <DQC_HOME>/bin/onlinectl.Mbat|sh] script. See Starting and Stopping the Server.  

When using DQC in batch mode, these parameters are passed in the <DQC_HOME>/bin/runcif.Qbat|sh] script. See Running a Plan from the Command Line.  

For a monitoring project running on ONE Web App, you may follow the steps below:  

  1. Locate a starting script for your DPE module. By default, it should be found at /ataccama/one/dpe-{version}/bin/local/exec_local.sh  

  2. Add this line to the script and save it:  

    export JAVA_OPTS=-Dengine.trimStringValues=false

     

  3. In the “application.properties” file (found by default at /ataccama/one/dpe-{version}/etc), find the section titled “#DPE Drivers and plugins config”  

  4. Add the following line to that section:  

    plugin.executor-launch-model.ataccama.one.launch-type-properties.LOCAL.exec=/bin/local/exec_local.sh
    (Please make sure your DPE launch script is found at /bin/local/exec_local.sh or change that part above)
  5. Restart DPE and rerun the monitoring project.  

Have you come across this issue before? If you have, but came up with another solution, I’d love to hear it. And if you run into issues or have questions, let us know in the comments!

Be the first to reply!

Reply