Skip to content

Cassandra Reader

CassandraReader plugin implements the ability to read data from Cassandra.

Configuration

Below is an example configuration for reading data from Cassandra to terminal

json
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      }
    },
    "content": {
      "reader": {
        "name": "cassandrareader",
        "parameter": {
          "host": "localhost",
          "port": 9042,
          "useSSL": false,
          "keyspace": "test",
          "table": "addax_src",
          "column": [
            "textCol",
            "blobCol",
            "writetime(blobCol)",
            "boolCol",
            "smallintCol",
            "tinyintCol",
            "intCol",
            "bigintCol",
            "varintCol",
            "floatCol",
            "doubleCol",
            "decimalCol",
            "dateCol",
            "timeCol",
            "timeStampCol",
            "uuidCol",
            "inetCol",
            "durationCol",
            "listCol",
            "mapCol",
            "setCol",
            "tupleCol",
            "udtCol"
          ]
        }
      },
      "writer": {
        "name": "streamwriter",
        "parameter": {
          "print": true
        }
      }
    }
  }
}

Parameters

ConfigurationRequiredData TypeDefault ValueDescription
hostYeslistNoneConnection domain or IP, multiple nodes separated by commas
portYesint9042Port
usernameNostringNoneUsername
passwordNostringNonePassword
useSSLNobooleanfalseWhether to use SSL connection
keyspaceYesstringNoneKeyspace where the table to be synchronized is located
tableYesstringNoneSelected table to be synchronized
columnYeslistNoneCollection of columns to be synchronized in the configured table, elements can specify column name or writetime(column_name), the latter form reads timestamp of column_name column instead of data
whereNostringNoneData filtering condition cql expression
allowFilteringNobooleanNoneWhether to filter data on server side, refer to official documentation for detailed description
consistencyLevelNostringLOCAL_QUORUMData consistency level, options: ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, ANY, TWO, THREE, LOCAL_ONE