Splunk® Enterprise

Splunk Dashboard Studio

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Use mock data with ds.test

The ds.test data source is used for sample data.

ds.test data sources can only be created in the source editor

You create column events and field values manually. The column and field options order are unimportant, but you must have the same number of column values as field names. ds.test is commonly structured similarly to this data source that visualizes monthly sales across multiple geographical regions.

"ds_MonthlySales": {
            "name": "ds_MonthlySales",
            "type": "ds.test",
            "options": {
                "data": {
                    "fields": [
                        {
                            "name": "month"
                        },
                        {
                            "name": "sales - americas"
                        },
                        {
                            "name": "sales - europe"
                        },
                        {
                            "name": "sales - asia"
                        },
                        {
                            "name": "sales - africa"
                        }
                    ],
                    "columns": [
                        [
                            "Jan",
                            "Feb",
                            "Mar",
                            "Apr",
                            "May",
                            "Jun",
                            "Jul",
                            "Aug",
                            "Sep",
                            "Oct",
                            "Nov",
                            "Dec"
                        ],
                        [
                            36821,
                            28683,
                            46253,
                            26723,
                            35745,
                            75265,
                            25255,
                            27467,
                            78267,
                            26581,
                            125252,
                            156212
                        ],
                        [
                            6821,
                            8683,
                            6253,
                            6723,
                            5745,
                            5265,
                            5255,
                            7467,
                            8267,
                            6581,
                            25252,
                            56212
                        ],
                        [
                            3621,
                            2683,
                            4623,
                            2623,
                            3745,
                            7565,
                            2525,
                            2747,
                            7867,
                            2581,
                            12522,
                            15612
                        ],
                        [
                            3682,
                            2863,
                            4653,
                            2723,
                            5745,
                            7526,
                            2525,
                            2767,
                            7267,
                            6581,
                            1252,
                            6212
                        ]
                    ]
                }
            }
        }

When combined with visual configurations for a column chart, the data source helps illustrate the progression of monthly sales in each region over one year.

A column chart using the ds.test data source to illustrate monthly sales over one year.

Last modified on 01 July, 2021
PREVIOUS
Use reports and saved searches with ds.savedSearch
  NEXT
Add secondary data sources to your visualization

This documentation applies to the following versions of Splunk® Enterprise: 8.2.1, 8.2.2, 8.2.3


Was this documentation topic helpful?

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