Alter Pipeline
Summary
The ALTER PIPELINE
command modifies the attributes of an existing pipeline domain object. Use it to add member steps and child pipelines to a parent pipeline.
Syntax
// Add a step or child pipeline member to a parent pipeline alter pipeline [ if exists] <pipeline_name> add step|pipeline <member_name> [before|after <existing_member_name>]|[position <position_#>] [as ([Condition=(< boolean expression>), Retries=<#>, RetryInterval=<#>, OnConditionFalse=<step_name|pipeline_name>, AbortOnConditionFalse=< true | false )>)]; // Define how a pipeline behaves if any pipeline member throws an error during execution alter pipeline [ if exists] <pipeline_name> as (ContinueOnError=< boolean expression>, OnError= <step or pipeline to invoke>, Finally= <step or pipeline to invoke>) // Rename the pipeline alter pipeline <pipeline_name> rename <new_pipeline_name>; // Manage pipeline labels alter pipeline <pipeline_name> add|drop label <label_identifier>; // Delete a member from a pipeline. The member step or pipeline remains in Connect. Only the parent pipeline definition is affected. alter pipeline <pipeline_name> drop position <position_#>; |
Parameters
Parameter
|
Description
|
---|---|
<pipeline_name> |
(Required) The name of an existing pipeline object to modify. |
[if exists] |
(Optional) Suppresses the step not found error when attempting to alter a step that does not exist in Connect. |
<member_name> |
(Optional) The name of a step or child pipeline to include in the primary <pipeline_name> . |
[<existing_member_name>] |
(Optional) Use to place a new pipeline member before or after an existing member by reference name in the pipeline. |
[<position_#>] |
(Optional) Use to place a new pipeline member before or after an existing member by position in the pipeline. Pipeline members cannot be dropped by member name, as the same same step or child pipeline can be used more than once in a parent pipeline. |
[as (Condition=(<boolean XSQL expresssion>)), Retries=<# of times to retry member if Condition=false>, RetryInterval=<number of seconds between retries>, OnConditionFalse=<execute step_name|pipeline_name>, AbortOnConditionFalse=<true|false>)] |
(Optional) The as Condition= syntax provides a conditional control structure to change pipeline execution flow. For example, if a boolean condition is not met before executing the pipeline member, the developer can configure the member to halt the parent pipeline execution and execute a different step or pipeline. Additionally, the developer may choose to abort or continue executing the parent pipeline when a conditional check returns false.
|
[as (ContinueOnError=<true|false>, OnError= <step or pipeline to invoke>, Finally= <step or pipeline to invoke>)] |
(Optional) These parameters determine how a pipeline behaves if one of its step or child pipeline members throws an error during execution.
|
<new_pipeline_name> |
(Optional) The new name for the pipeline object. |
<label_identifier> |
(Optional) The label identifier. Labels allow developers to add descriptive string tags to step and pipeline objects. Labels are added to the metadata returned by the SHOW PIPELINE commands. A pipeline can have more than one label. |
Details
Steps and pipelines are the core mechanisms for designing ETL processes within Connect.
Examples
The step objects shown in the following examples are not stock Connect objects. The alter pipeline commands will fail if a step object does not exist in your environment. The examples demonstrate how to use the different command syntax and parameters.
// Add a step to a pipeline
alter pipeline p_upload_orders add step s_run_validation;
// Add a child pipeline to a parent pipeline with if exists
alter pipeline if exists p_upload_orders add pipeline p_clear_staging_tables;
// Add a step between members 1 and 2
alter pipeline p_upload_orders add step s_send_start_email position 1;
// Drop the step or child pipeline found at position 3
alter pipeline p_upload_orders drop position 3;
// Add a child pipeline before step s1_oops
alter pipeline p1 add pipeline p_get_period_name before s1_oops;
// Delete a member from a pipeline. To find the position number of a member, use SHOW PIPELINE
<pipeline_name> MEMBERS
.
alter pipeline p_upload_orders drop position 2;
// Add a label descriptor
alter pipeline p_upload_orders add label ‘Pipeline downloads Opportunities from SFDC and loads into Incent’;
// Delete a label
alter pipeline p_upload_orders drop label ‘Pipeline downloads Opportunities from SFDC and loads into Incent’;
// Rename a pipeline
alter pipeline p_upload_orders rename p_upload_orders_from_sfdc;
// Compound example with Conditional expression
alter pipeline if exists p_upload_orders
add step s_init_vars
position 3
as (Condition=(Exists(FilePath=’customer_lookup_file.csv’)),
Retries=2,
RetryInterval=10,
OnConditionFalse=s_send_error_email,
AbortOnConditionFalse=true);
// Control how pipeline behaves if a system error or other exception is thrown during execution
alter pipeline p_on_error_test_2 as
(ContinueOnError=false,
OnError=s_send_error_email,
Finally=s_finally_reinit_vars);
Related Commands