This topic describes the parameters of Stream Writer and how to configure it by using the code editor.

Stream Writer allows you to display the data that is obtained from a Data Integration reader on the screen or discard the data. Stream Writer is applicable to performance testing for data synchronization and basic functional testing.

Parameters

print
  • Description: specifies whether to display the data that is obtained from the reader on the screen
  • Required: No
  • Default value: true

Configure Stream Writer by using the codeless UI

The codeless user interface (UI) is not supported for Stream Writer.

Configure Stream Writer by using the code editor

You can configure Stream Writer by using the code editor. For more information, see Create a sync node by using the code editor.

The following example shows how to configure a sync node to display the data that is obtained from a Data Integration reader on the screen:
{
    "type":"job",
    "version":"2.0",// The version number.
    "steps":[
        {
            "stepType":"stream",
            "parameter":{},
            "name":"Reader",
            "category":"reader"
        },
        {
            "stepType":"stream",// The writer type.
            "parameter":{
                "print":false,// Specifies whether to display data on the screen.
                "fieldDelimiter":","// The column delimiter.
            },
            "name":"Writer",
            "category":"writer"
        }
    ],
    "setting":{
        "errorLimit":{
            "record":"0"// The maximum number of dirty data records allowed.
        },
        "speed":{
            "throttle":false,// Specifies whether to enable bandwidth throttling. A value of false indicates that the bandwidth is not throttled. A value of true indicates that the bandwidth is throttled. The maximum transmission rate takes effect only if you set this parameter to true.
            "concurrent":1// The maximum number of concurrent threads.
        }
    },
    "order":{
        "hops":[
            {
                "from":"Reader",
                "to":"Writer"
            }
        ]
    }
}