Splunk® Data Stream Processor

Connect to Data Sources and Destinations with DSP

On October 30, 2022, all 1.2.x versions of the Splunk Data Stream Processor will reach its end of support date. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see the Upgrade the Splunk Data Stream Processor topic.
This documentation does not apply to the most recent version of Splunk® Data Stream Processor. For documentation on the most recent version, go to the latest release.

Deserialize and preview data from Google Cloud Pub/Sub in DSP

When you create a data pipeline in the to ingest data from a Google Cloud Pub/Sub topic using the Google Cloud Pub/Sub source function, the ingested data is encoded as bytes. To view the data as human-readable strings during data preview, you must deserialize the data.

Prerequisites

To ingest data from Google Cloud Pub/Sub into a DSP pipeline, you must have a connection to a Google Cloud Pub/Sub topic. See Create a DSP connection to Google Cloud Pub/Sub.

Steps

  1. From the home page, click Create Pipeline and then select Google Cloud Pub/Sub as your data source.
  2. Configure the Google Cloud Pub/Sub source function to use your Google Cloud Pub/Sub connection and get data from your Pub/Sub topic. See Get data from Google Cloud Pub/Sub.
  3. On the pipeline canvas, click the + icon next to the Google Cloud Pub/Sub function and then select Eval from the function picker.
  4. On the View Configurations tab, enter the following SPL2 expression in the function field:
    body=to_string(body)
    
  5. Click the Start Preview button and click the Eval function on the pipeline canvas to confirm that the data in the body field has been deserialized from bytes into strings.
  6. (Optional) Click the Stop Preview Stop Preview button button and continue building your pipeline by adding new functions to it.
Last modified on 21 July, 2021
Create a DSP connection to Google Cloud Pub/Sub   Connecting Google Cloud Storage to your DSP pipeline as a data destination

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0, 1.2.1-patch02, 1.2.1, 1.2.2-patch02, 1.2.4, 1.2.5


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters