VIM – JOIN Conditions with Unicode and ASCII

JOIN Conditions with Unicode and ASCII I cannot stress the dangers of copying data from Excel or HTML and assuming that it’s ASCII. For example U+0040 is the unicode version of @. We ingested the unicode version and couldn’t see why a JOIN condition on the data table wasn’t working. I looked at the source […]

Remove Duplicates in DB2 Columnar Format

I had dupe data in my OLAP table, where the columnar data can be duplicated based on event id. (I loaded data 2x). I had to differentiate the data and remove the duplicates, so I assigned row_numbers over a partition ordered by. I hope this helps you. db2 “update (select OME.*, row_number() over(partition by IDN_EVENT_ID […]

Maven Animal Sniffer Plugin

For the past few years, most of my personal and professional projects are built using Maven.  The dependency management and corresponding build lifecycle enable me to do some complex builds (for instance HBase 1.2.5 Client Jars). Command mvn dependency:tree -f demo-app/pom.xml Result [INFO] demo.app:demo-app:jar:1.0-SNAPSHOT [INFO] +- junit:junit:jar:4.12:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] \- org.apache.hbase:hbase:pom:1.2.5:compile [INFO] […]

Jenkinsfile Triggers

It tooks me far too long to get Jenkinsfile to stop overwriting my Triggers as noted in https://github.com/jenkinsci/gitlab-plugin/issues/692 . You’ll see WARNING: The properties step will remove all JobPropertys currently configured in this job, either from the UI or from an earlier properties step. References https://github.com/jenkinsci/gitlab-plugin https://github.com/jenkinsci/gitlab-plugin/blob/master/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java https://github.com/jenkinsci/gitlab-plugin/blob/master/src/main/resources/com/dabsquared/gitlabjenkins/GitLabPushTrigger/config.jelly https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/triggers/GitLabTriggerContext.groovy https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Trigger-runs https://dev.to/pencillr/jenkins-pipelines-and-their-dirty-secrets-2 https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Parametrized-pipelines https://issues.jenkins-ci.org/browse/JENKINS-45053 https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline https://jenkins.io/doc/pipeline/steps/ […]

Using jjs to confirm issue with DatatypeConverter in WebSphere Liberty

I kept running into a funky ‘java.lang.NullPointerException’ with the WebSphere Liberty included DataValidator. To debug the issue, I used the jjs – nashorn engine If you need, to figure out where the class is located try { Class c = Class.forName(“javax.xml.bind.DatatypeConverter”); System.out.println(“Location ” + c.getProtectionDomain().getCodeSource().getLocation()); } catch (ClassNotFoundException e1) { TODO Auto-generated catch block e1.printStackTrace(); […]

Formatting JSON with VIM

I am working on an analytics project where we generate very complicated medical analysis and put it in a hierarchical data model. { “test” : { “test1” : “val1” } } Open the JSON in vim and use python -m json.tool :%!python -m json.tool Results { “test”: { “test1”: “val1” } } References https://coderwall.com/p/faceag/format-json-in-vim https://til.hashrocket.com/posts/ha0ci0pvkj-format-json-in-vim-with-jq […]