Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "artifact": {
    "name": "cdap-data-streams",
    "version": "6.3.0",
    "scope": "SYSTEM"
  },
  "name": "twitterToStream",
  "config": {
    "batchInterval": "10s",
    "stages": [
      {
        "name": "twitterSource",
        "plugin": {
          "name": "Twitter",
          "type": "streamingsource",
          "artifact": {
            "name": "spark-plugins",
            "version": "2.5.0",
            "scope": "SYSTEM"
          },
          "properties": {
            "referenceName": "xxx",
            "AccessToken": "xxx",
            "AccessTokenSecret": "xxx",
            "ConsumerKey": "xxx",
            "ConsumerSecret": "xxx"
          }
        }
      },
      {
        "name": "dropProjector",
        "plugin": {
          "name": "Projection",
          "type": "transform",
          "artifact": {
            "name": "core-plugins",
            "version": "2.5.0",
            "scope": "SYSTEM"
          },
          "properties": {
            "drop": "lang,time,favCount,source,geoLat,geoLong,isRetweet",
            "rename": "message:tweet,rtCount:retCount"
          }
        }
      },
      {
        "name": "tableSink",
        "plugin": {
          "name": "Table",
          "type": "batchsink",
          "artifact": {
            "name": "core-plugins",
            "version": "2.5.0",
            "scope": "SYSTEM"
          },
          "properties": {
            "name": "myTabletableSink",
            "schema": "{\"type\":\"record\",\"name\":\"etlSchemaBody\",\"fields\":[{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"tweet\",\"type\":\"string\"},{\"name\":\"retCount\",\"type\":\"int\"}]}",
            "schema.row.field": "id"
          }
        }
      }
    ],
    "connections": [
      {
        "from": "twitterSource",
        "to": "dropProjector"
      },
      {
        "from": "dropProjector",
        "to": "tableSink"
      }
    ]
  }
}

...