CMR OpenFIGI for Sproutly Canada via the Spark Shell

From the command line run the spark-shell script with the following parameters:

[OSX]$ ./spark-shell –packages “com.coherentlogic.cmr.api:cmr-api-core:2.0.2.1-RELEASE,dom4j:dom4j:1.6.1,com.fasterxml.jackson.core:jackson-databind:2.9.6” –exclude-packages “junit:junit,org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec,org.jboss.spec.javax.servlet:jboss-servlet-api_3.1_spec,org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec,javax.activation:activation,net.jcip:jcip-annotations,org.jboss.logging:jboss-logging-annotations,org.jboss.logging:jboss-logging-processor”

Once the Spark shell is running, enter the following:

import com.coherentlogic.cmr.openfigi._
import com.coherentlogic.cmr.api.builders.CMR
val cmr = new CMR ()
val dataDS = cmr.openFIGI.getRequestBody.withFinancialInstrumentGlobalIdentifier(“BBG00K62SK81”).done.doGetAsDataDataset(spark)

— this script will retrieve OpenFIGI data for Sproutly Canada.

CMR OpenFIGI for Sproutly Canada via the Spark Shell