Versions Compared

Key

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

This tutorial will guide you on how to expose data stored in Cassandra as a data serviceAlso, see the samples in Data Integration Samples.

...

...

  1. Click Add New Query and enter the following details:

    Query IDEnter getUsersbyID as the query ID.
    DatasourceSelect the datasource for which you are going to write a query. Select the Cassandra datasource that you created previously.
    SQL

    In this field, enter the SQL statement describing the data that should be retrieved from the Cassandra datasource.

    Code Block
    SELECT id, age, country, name FROM UsersKS.Users WHERE id = :id
  2. Click Generate Input Mapping to create the input mapping. The id is the input as shown below.


  3. Edit the id column and change the Type to UUID.
  4. Save the mapping and click Main Configuration to return to the query.
  5. Click Generate Response to create the output mapping. This defines how the employee details retrieved from the datasource will be presented in the result. Note that, by default, the output type is XML. 

  6. Save the query.
  7. Click Next to open the Operations screen.

...