Ask Your Question
1

Setting label or instance name per pipeline

asked 2018-07-23 05:55:37 -0500

cb2018 gravatar image

I'm using the python sdk and I successfully created pipelines. However, I don't know how to set the label or name per pipeline and also the description. Any Ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-23 12:20:29 -0500

kirti gravatar image

updated 2018-07-24 13:32:05 -0500

1) You can do something like following:

pipeline = builder.build('SDK pipeline title')
pipeline.metadata['labels'] = ['SDK Label', 'StreamSets Label']
data_collector.add_pipeline(pipeline)

where

  • 'SDK pipeline title' is the title for the pipeline which is 'Title' field from SDC UI,
  • ['SDK Label', 'StreamSets Label'] are the labels for the pipeline.

For API reference: https://streamsets.com/documentation/... Just search for 'Build the pipeline.'

2) I do not think 'description' is exposed attribute at this time. So not available to set it. Please feel free to file a JIRA for it, if you wish.

As a workaround for setting 'description', you can export the pipeline, add/change description in the json exported and then import it back.

  • data_collector.api_client.export_pipeline(pipeline.id)
  • data_collector.api_client.import_pipeline(...)

image description

edit flag offensive delete link more

Comments

Hi what I want to do is to set the name of each pipeline from the general configuration tab, any ideas? The name above description.

cb2018 gravatar imagecb2018 ( 2018-07-24 01:43:30 -0500 )edit

In SDC 3.4.0-SNAPSHOT I am seeing it as Title field - one above description. which can be set as pipeline = builder.build('SDK pipeline title')

kirti gravatar imagekirti ( 2018-07-24 12:30:19 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-07-23 05:55:37 -0500

Seen: 30 times

Last updated: Jul 24