Sdílet prostřednictvím


SwitchActivity Class

Definition

This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property.

public class SwitchActivity : Azure.ResourceManager.DataFactory.Models.ControlActivity, System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.DataFactory.Models.SwitchActivity>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.DataFactory.Models.SwitchActivity>
public class SwitchActivity : Azure.ResourceManager.DataFactory.Models.ControlActivity
type SwitchActivity = class
    inherit ControlActivity
    interface IJsonModel<SwitchActivity>
    interface IPersistableModel<SwitchActivity>
type SwitchActivity = class
    inherit ControlActivity
Public Class SwitchActivity
Inherits ControlActivity
Implements IJsonModel(Of SwitchActivity), IPersistableModel(Of SwitchActivity)
Public Class SwitchActivity
Inherits ControlActivity
Inheritance
Implements

Constructors

SwitchActivity(String, DataFactoryExpression)

Initializes a new instance of SwitchActivity.

Properties

AdditionalProperties

Additional Properties

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

(Inherited from PipelineActivity)
Cases

List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.

DefaultActivities

List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action. Please note PipelineActivity is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include AppendVariableActivity, AzureDataExplorerCommandActivity, AzureFunctionActivity, AzureMLBatchExecutionActivity, AzureMLExecutePipelineActivity, AzureMLUpdateResourceActivity, ControlActivity, CopyActivity, CustomActivity, DatabricksNotebookActivity, DatabricksSparkJarActivity, DatabricksSparkPythonActivity, DataLakeAnalyticsUsqlActivity, DeleteActivity, ExecuteDataFlowActivity, ExecutePipelineActivity, ExecuteSsisPackageActivity, ExecuteWranglingDataflowActivity, ExecutionActivity, FailActivity, FilterActivity, ForEachActivity, GetDatasetMetadataActivity, HDInsightHiveActivity, HDInsightMapReduceActivity, HDInsightPigActivity, HDInsightSparkActivity, HDInsightStreamingActivity, IfConditionActivity, LookupActivity, DataFactoryScriptActivity, SetVariableActivity, SynapseSparkJobDefinitionActivity, SqlServerStoredProcedureActivity, SwitchActivity, SynapseNotebookActivity, UntilActivity, ValidationActivity, WaitActivity, WebActivity and WebHookActivity.

DependsOn

Activity depends on condition.

(Inherited from PipelineActivity)
Description

Activity description.

(Inherited from PipelineActivity)
Name

Activity name.

(Inherited from PipelineActivity)
On

An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.

OnInactiveMarkAs

Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.

(Inherited from PipelineActivity)
State

Activity state. This is an optional property and if not provided, the state will be Active by default.

(Inherited from PipelineActivity)
UserProperties

Activity user properties.

(Inherited from PipelineActivity)

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from ControlActivity)

Explicit Interface Implementations

IJsonModel<ControlActivity>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from ControlActivity)
IJsonModel<ControlActivity>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ControlActivity)
IJsonModel<PipelineActivity>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from PipelineActivity)
IJsonModel<PipelineActivity>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from PipelineActivity)
IJsonModel<SwitchActivity>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<SwitchActivity>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ControlActivity>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ControlActivity)
IPersistableModel<ControlActivity>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from ControlActivity)
IPersistableModel<ControlActivity>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ControlActivity)
IPersistableModel<PipelineActivity>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from PipelineActivity)
IPersistableModel<PipelineActivity>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from PipelineActivity)
IPersistableModel<PipelineActivity>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from PipelineActivity)
IPersistableModel<SwitchActivity>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<SwitchActivity>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<SwitchActivity>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to