Editing a streams flow
You can easily change a streams flow design to get the information that you need to make business decisions in real time.
Editing the canvas makes it easy to customize the data flow. You can do any of the following actions:
Add alerts and several types of analytic operators
Add multiple sources and targets
Edit operator properties to meet your needs
Change the name of the operator itself
Link operators by dragging your mouse pointer from an output port of one operator to the input port of another operator
Change the name of the streams flow, the text in its Description field, and the Streaming Analytics service instance that is associated with it
Install Python packages that are managed by the pip package management system
You can open the edit canvas from the
We validate all changes to ensure that your streams flow runs, and then we update the streams flow.
The source data must be in JSON format.
If a time stamp attribute exists, it must be in ISO-8601 format, with any delimiter. Milliseconds are optional, and the time zone must not be present. Valid time stamp examples are
2018-01-08 07:11:36.877. For more information about date formats that are supported in a streams flow, see Date formats.
You must have the Editor role to edit your own streams flow or the Admin role to edit all stream flows.
You must know the project where the streams flow is located.
The following instances must be associated with the project where the streams flow runs:
Cloud Object Storage instance
Streaming Analytics service instance
To check that the instances are associated, go to the
To create an instance, go to your account in IBM Cloud Dashboard. Click Create resource, and then follow the prompts.
Watch this video to see how to provision the services necessary to create, edit, and run a streams flow.
To edit a streams flow, do the following steps:
From the Projects menu, do these steps:
a) Click View All Projects, and then click the name of the project where your streams flow is located.
b) In the
Projectpage, click the Assets tab.
c) Scroll down to the Streams Flow section. If you have more than 10 stream flows, click **View all ** to see all stream flows in Tiles view or in Table view. You can search the list by the name, status, and creator. You can create a new streams flow.
d) Click the three dots in the ACTIONS column of the streams flow that you want to change, and then click Edit.
Alternatively, from the
Metricspage, click the Edit icon .
You can do any of the following actions in the canvas:
a) Drag operators from the canvas palette to the canvas.
b) Link operators together by dragging the mouse cursor from the output port of one operator to the input port of another.
c) Display and change properties about any operator by clicking that operator. Change the properties in the Properties pane.
d) Change the name of the operator by double-clicking the operator name, and then typing in the new name. For example, you might change the Aggregate operator name to
Aggregate by Event Type.
e) Display schema fields of an operator by hovering the mouse pointer over the link. For example, you can see each field and its data type. .
This feature can be a great help when you use some of the analytics operators or when you need to change the data schema.
f) Change the schema fields of an operator by clicking the operator, and then click Edit Output Schema in the Properties pane.
g) Change the name of the streams flow, the text in its Description field, or the Streaming Analytics service instance that is associated with it by clicking Settings (). The Settings panel opens to the General tab. Make your changes, and then click Save.
h) Install any Python packages to be in addition to the supported and preinstalled packages by clicking Settings (), and then clicking Runtime. Follow the steps to install Python packages.
i) Change the Streaming Analytics service instance by clicking Settings (), and then clicking Runtime. Select the instance that you want to use.
As you edit your streams flow, we validate the changes. The Validation icon () is shown during this process. If errors exist in the streams flow, the Notification icon () is displayed. When no errors exist, the Notification icon is disabled ().
If the Notification icon is displayed, do the following steps:
a) Click the Notification icon to display general error messages. For example, the error in a Sample Data operator might be “Sample Data - Required parameters are missing.”
b) A red circle () is shown in the operator that has the error. Hover your mouse pointer over the red dot to see specific errors.
c) Click the operator that has errors to open its Properties pane. A red circle is shown next to the problematic properties. Correct the problem.
The following screen capture shows the three areas where errors are displayed.
Click the Save icon () to save the streams flow and any changes that you made in the Settings panel. Click Metrics () to go to the
Note: Editing and saving a streams flow creates an updated version of the streams flow with the same name. If the streams flow is currently running and you edit and save the streams flow, a new draft is saved. You get a notification to redeploy with the updated streams flow.