PreviewDataPipeline

Updated at:

Previews a data pipeline.

Operation description

Compiles candidate configurations and queries read-only samples grouped by dataset within a specified time window.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:PreviewDataPipeline

none

*DataPipeline

acs:cms:{#regionId}:{#accountId}:workspace/{#Workspace}/datapipeline/{#PipelineName}

None None

Request syntax

POST /workspace/{workspace}/datapipeline/preview HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspace

string

Yes

The name of the workspace.

workspace-source

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The preview configuration.

description

string

No

The description of the pipeline.

Preview error span routing.

fromTime

integer

No

The start time of the preview. The value is a UNIX timestamp in seconds.

1784563200

kind

string

No

The type of the pipeline.

Valid values:

  • default :

    Default pipeline.

  • custom :

    Custom pipeline.

  • export :

    Export pipeline.

custom

outputs

array<object>

No

The named outputs.

array<object>

No

The named outputs.

name

string

No

The name of the output.

checkout_route

processors

array<object>

No

The branch processors.

array<object>

No

The processor.

config

object

No

The processor configuration.

applications

array

No

The list of applications.

string

No

The name of the application.

checkout-service

assignments

array<object>

No

The list of field assignments.

object

No

The pipeline field assignment.

expression

string

No

The assignment expression.

duration / 1000000.0

field

string

No

The output field.

latency_ms

expression

string

No

The filter expression.

attributes["http.route"] != "/health"

fields

array

No

The list of fields.

string

No

The field path.

attributes.password

parameters

object

No

The extended parameters.

{"vendor":"example"}

any

No

The parameter.

{}

projections

array<object>

No

The list of field projections.

object

No

The pipeline field projection.

source

string

No

The source field.

serviceName

target

string

No

The target field.

service

rules

array<object>

No

The list of data masking rules.

object

No

The data masking rule.

keepPrefix

integer

No

The length of the retained prefix.

2

keepSuffix

integer

No

The length of the retained suffix.

2

keys

array

No

The sensitive keywords.

string

No

The keyword.

password

maskChar

string

No

The mask character.

#

mode

string

No

The data masking mode.

keyword

types

array

No

The built-in sensitive types.

string

No

The sensitive type.

EMAIL

scope

object

No

The effective scope of pipeline processing.

conditions

array<object>

No

The additional field conditions.

array<object>

No

The field condition.

field

object

No

The field reference.

container

string

No

The JSON object container.

attributes

kind

string

No

The reference data type.

Valid values:

  • field :

    Regular field.

  • json :

    JSON object key path.

  • label :

    Metric label.

field

name

string

No

The name of the field or dimension.

service.name

path

array

No

The JSON literal key path.

string

No

The JSON object key.

service.name

matchType

string

No

The match type.

Valid values:

  • GLOB :

    Glob match.

  • EXACT :

    Exact match.

EXACT

values

array

No

The match values.

string

No

The match values.

['abc']

metricName

object

No

The metric name scope.

matchType

string

No

The match type.

EXACT

values

array

No

The metric names.

["http_requests_total"]

string

No

The value.

['abc']

serviceName

object

No

The service name scope.

matchType

string

No

The match type.

Valid values:

  • GLOB :

    Glob match.

  • EXACT :

    Exact match.

EXACT

values

array

No

The match values.

string

No

The match values.

['abc']

script

string

No

The SPL script.

* | extend latency_ms = duration / 1000000

selector

object

No

The service selector.

serviceNames

array

No

The service name list.

["checkout-*","order-service"]

string

No

The service name pattern.

checkout-*

target

object

No

The processing target.

workspace

string

No

The target workspace.

target-checkout-ws

name

string

No

The processor name.

drop-health-check

type

string

No

The processor type.

filter

pipelineName

string

No

The pipeline name.

trace-archive-routing

processors

array<object>

No

The common processors.

array<object>

No

The processor.

config

object

No

The processor configuration.

applications

array

No

The list of applications.

string

No

The name of the application.

checkout-service

assignments

array<object>

No

The list of field assignments.

object

No

The pipeline field assignment.

expression

string

No

The assignment expression.

duration / 1000000.0

field

string

No

The output field.

latency_ms

expression

string

No

The filter expression.

attributes["http.route"] != "/health"

fields

array

No

The list of fields.

string

No

The field path.

attributes.password

parameters

object

No

The extended parameters.

{"vendor":"example"}

any

No

The parameter.

{}

projections

array<object>

No

The list of field projections.

object

No

The pipeline field projection.

source

string

No

The source field.

serviceName

target

string

No

The target field.

service

rules

array<object>

No

The list of data masking rules.

object

No

The data masking rule.

keepPrefix

integer

No

The length of the retained prefix.

2

keepSuffix

integer

No

The length of the retained suffix.

2

keys

array

No

The sensitive keywords.

string

No

The keyword.

password

maskChar

string

No

The mask character.

#

mode

string

No

The data masking mode.

keyword

types

array

No

The built-in sensitive types.

string

No

The sensitive type.

EMAIL

scope

object

No

The effective scope of pipeline processing.

conditions

array<object>

No

The additional field conditions.

array<object>

No

The field condition.

field

object

No

The field reference.

container

string

No

The JSON object container.

resources

kind

string

No

The reference data type.

Valid values:

  • field :

    Regular field.

  • json :

    JSON object key path.

  • label :

    Metric label.

field

name

string

No

The name of the field or dimension.

service.name

path

array

No

The JSON literal key path.

string

No

The JSON object key.

service.name

matchType

string

No

The match type.

Valid values:

  • GLOB :

    Glob match.

  • EXACT :

    Exact match.

EXACT

values

array

No

The match values.

string

No

The match values.

['ABC']

metricName

object

No

The metric name scope.

matchType

string

No

The match type.

EXACT

values

array

No

The metric names.

["http_requests_total"]

string

No

The value.

['abc']

serviceName

object

No

The service name scope.

matchType

string

No

The match type.

Valid values:

  • GLOB :

    Glob match.

  • EXACT :

    Exact match.

EXACT

values

array

No

The match values.

string

No

The match values.

['abc']

script

string

No

The SPL script.

* | extend latency_ms = duration / 1000000

selector

object

No

The service selector.

serviceNames

array

No

The service name list.

["checkout-*","order-service"]

string

No

The service name pattern.

checkout-*

target

object

No

The processing target.

workspace

string

No

The target workspace.

target-checkout-ws

name

string

No

The processor name.

drop-health-check

type

string

No

The processor type.

filter

sinks

array<object>

No

The output destinations.

object

No

The output destinations.

datasets

array

No

The dataset list.

string

No

The dataset name.

__UNNAMED__

logstore

string

No

SLS Logstore

error-spans

name

string

No

The output destination name.

error-archive

project

string

No

SLS Project

customer-project

type

string

No

The output destination type.

logstore

source

object

No

The data source.

config

object

No

The datasource config.

runMode

string

No

The run mode.

continuous

startFrom

string

No

The read start position.

latest

timeRange

object

No

The backfill time range.

from

integer

No

The start time.

1722844800

to

integer

No

The end time.

1722848400

type

string

No

The data source type.

traces-default

toTime

integer

No

The end time for the preview, specified as a UNIX timestamp in seconds.

1784566800

Response elements

Element

Type

Description

Example

object

The preview data pipeline response.

datasets

array<object>

The dataset preview results.

array<object>

The dataset preview.

data

array<object>

The preview data.

object

The preview sample row.

{"trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","status_code":"ERROR"}

meta

array<object>

The field metadata.

object

The field metadata.

name

string

The field name.

trace_id

type

string

The field type.

string

name

string

The dataset name.

error_spans

sampleCount

integer

The sample count.

1

diagnostics

object

The aggregation diagnostics.

{"emittedPoints":2,"displayTruncated":false}

effectiveScript

string

The effective SPL.

* | where status_code == "ERROR"

requestId

string

The request ID.

req-01j2example

Examples

Success response

JSON format

{
  "datasets": [
    {
      "data": [
        {
          "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
          "status_code": "ERROR"
        }
      ],
      "meta": [
        {
          "name": "trace_id",
          "type": "string"
        }
      ],
      "name": "error_spans",
      "sampleCount": 1
    }
  ],
  "diagnostics": {
    "emittedPoints": 2,
    "displayTruncated": false
  },
  "effectiveScript": "* | where status_code == \"ERROR\"",
  "requestId": "req-01j2example"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.