com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Exposing Cassandra as a Data Service

This tutorial will guide you on how to expose data stored in Cassandra as a data service. For instructions, go to Apache Cassandra Documentation.


Install and start Cassandra

A Cassandra server of version 1.2.x, 2.0 or 3.0 should be already running in the default port. Cassandra version 3.0 is recommended from DSS 3.5.1 onwards.


Adding a Cassandra datasource

Now, let's start creating the data service from scratch:

Define a query for the datasource

Now let's start writing a query for getting data from the datasource. The query will specify the data that should be fetched by this query, and the format that should be used to display data when the query is invoked.

  1. Click Add New Query to open the Add New Query screen.
  2. Enter the following values:
    • Query ID: Enter an ID for the query.
    • Datasource: Select 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 RDBMS datasource.

  3. Add input mappingsInput mappings allow you to add parameters to a query so that you can set the parameter value when executing the query. 

    Find out more about defining Input Mappings in WSO2 DSS.

  4. Add output mappings: Out mapping is used to specify how the data that is fetched from your query will be shown in the response.

    Find out more about defining Output Mappings in WSO2 DSS.

  5. Click Next to open the Operations screen.

Define operation to invoke the query

Follow the steps given below.

  1. Click Add New Operation to open Add New Operation screen.
  2. Add a name for your operation in the Operation Name field.
  3. In the Query ID field, select the query that you defined previously.
  4. Save the operation.

Finish creating the data service

Once you have defined the operation, click Finish to complete the data service creation process. You will now be taken to the Deployed Services screen, which shows all the data services deployed on the server.

Samples

For a sample, which exposes Cassandra as a data service, see Cassandra Sample.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.