GlueCustomConnectors/gluescripts/withConnection/JDBCSalesforce.java [5:27]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
object Salesforcejdbc {
  def main(sysArgs: Array[String]) {
    val conf = new SparkConf().setAppName("JDBCSalesforce").setMaster("local")
    val spark: SparkContext = new SparkContext(conf)
    val glueContext: GlueContext = new GlueContext(spark)
    val rootLogger = Logger.getRootLogger()
    rootLogger.setLevel(Level.ERROR)
    // Please update the values in the optionsMap to connect to your own data source
    val optionsMap = Map(
      "dbTable" -> "Account",
      "partitionColumn" -> "RecordId__c",
      "lowerBound" -> "0",
      "upperBound" -> "123",
      "numPartitions" -> "6",
      "connectionName" -> "my-connection" // please refer to Glue Studio Create Custom Connector doc to create a connection
    )
    val customSource = glueContext.getSource(
      connectionType = "custom.jdbc", // for marketplace workflow, use marketplace.jdbc
      connectionOptions = JsonOptions(optionsMap),
      transformationContext = "")
    val dyf = customSource.getDynamicFrame()
    dyf.printSchema()
    dyf.show()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



GlueCustomConnectors/gluescripts/withConnection/JDBCSalesforce.scala [5:27]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
object Salesforcejdbc {
  def main(sysArgs: Array[String]) {
    val conf = new SparkConf().setAppName("JDBCSalesforce").setMaster("local")
    val spark: SparkContext = new SparkContext(conf)
    val glueContext: GlueContext = new GlueContext(spark)
    val rootLogger = Logger.getRootLogger()
    rootLogger.setLevel(Level.ERROR)
    // Please update the values in the optionsMap to connect to your own data source
    val optionsMap = Map(
      "dbTable" -> "Account",
      "partitionColumn" -> "RecordId__c",
      "lowerBound" -> "0",
      "upperBound" -> "123",
      "numPartitions" -> "6",
      "connectionName" -> "my-connection" // please refer to Glue Studio Create Custom Connector doc to create a connection
    )
    val customSource = glueContext.getSource(
      connectionType = "custom.jdbc", // for marketplace workflow, use marketplace.jdbc
      connectionOptions = JsonOptions(optionsMap),
      transformationContext = "")
    val dyf = customSource.getDynamicFrame()
    dyf.printSchema()
    dyf.show()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



