ScriptActivity Class

public final class ScriptActivity
extends ExecutionActivity

Script activity type.

Constructor Summary

Constructor Description
ScriptActivity()

Creates an instance of ScriptActivity class.

Method Summary

Modifier and Type Method and Description
static ScriptActivity fromJson(JsonReader jsonReader)

Reads an instance of ScriptActivity from the JsonReader.

ScriptActivityTypePropertiesLogSettings logSettings()

Get the logSettings property: Log settings of script activity.

Object returnMultistatementResult()

Get the returnMultistatementResult property: Enable to retrieve result sets from multiple SQL statements and the number of rows affected by the DML statement.

Object scriptBlockExecutionTimeout()

Get the scriptBlockExecutionTimeout property: ScriptBlock execution timeout.

List<ScriptActivityScriptBlock> scripts()

Get the scripts property: Array of script blocks.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of activity.

void validate()

Validates the instance.

ScriptActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

ScriptActivity withDescription(String description)

Set the description property: Activity description.

ScriptActivity withLinkedServiceName(LinkedServiceReference linkedServiceName)

Set the linkedServiceName property: Linked service reference.

ScriptActivity withLogSettings(ScriptActivityTypePropertiesLogSettings logSettings)

Set the logSettings property: Log settings of script activity.

ScriptActivity withName(String name)

Set the name property: Activity name.

ScriptActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: Status result of the activity when the state is set to Inactive.

ScriptActivity withPolicy(ActivityPolicy policy)

Set the policy property: Activity policy.

ScriptActivity withReturnMultistatementResult(Object returnMultistatementResult)

Set the returnMultistatementResult property: Enable to retrieve result sets from multiple SQL statements and the number of rows affected by the DML statement.

ScriptActivity withScriptBlockExecutionTimeout(Object scriptBlockExecutionTimeout)

Set the scriptBlockExecutionTimeout property: ScriptBlock execution timeout.

ScriptActivity withScripts(List<ScriptActivityScriptBlock> scripts)

Set the scripts property: Array of script blocks.

ScriptActivity withState(ActivityState state)

Set the state property: Activity state.

ScriptActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Methods inherited from Activity

Methods inherited from ExecutionActivity

Methods inherited from java.lang.Object

Constructor Details

ScriptActivity

public ScriptActivity()

Creates an instance of ScriptActivity class.

Method Details

fromJson

public static ScriptActivity fromJson(JsonReader jsonReader)

Reads an instance of ScriptActivity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ScriptActivity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

logSettings

public ScriptActivityTypePropertiesLogSettings logSettings()

Get the logSettings property: Log settings of script activity.

Returns:

the logSettings value.

returnMultistatementResult

public Object returnMultistatementResult()

Get the returnMultistatementResult property: Enable to retrieve result sets from multiple SQL statements and the number of rows affected by the DML statement. Supported connector: SnowflakeV2. Type: boolean (or Expression with resultType boolean).

Returns:

the returnMultistatementResult value.

scriptBlockExecutionTimeout

public Object scriptBlockExecutionTimeout()

Get the scriptBlockExecutionTimeout property: ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Returns:

the scriptBlockExecutionTimeout value.

scripts

public List<ScriptActivityScriptBlock> scripts()

Get the scripts property: Array of script blocks. Type: array.

Returns:

the scripts value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ScriptActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of activity.

Overrides:

ScriptActivity.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

ScriptActivity.validate()

withDependsOn

public ScriptActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

ScriptActivity.withDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

withDescription

public ScriptActivity withDescription(String description)

Set the description property: Activity description.

Overrides:

ScriptActivity.withDescription(String description)

Parameters:

description

withLinkedServiceName

public ScriptActivity withLinkedServiceName(LinkedServiceReference linkedServiceName)

Set the linkedServiceName property: Linked service reference.

Overrides:

ScriptActivity.withLinkedServiceName(LinkedServiceReference linkedServiceName)

Parameters:

linkedServiceName

withLogSettings

public ScriptActivity withLogSettings(ScriptActivityTypePropertiesLogSettings logSettings)

Set the logSettings property: Log settings of script activity.

Parameters:

logSettings - the logSettings value to set.

Returns:

the ScriptActivity object itself.

withName

public ScriptActivity withName(String name)

Set the name property: Activity name.

Overrides:

ScriptActivity.withName(String name)

Parameters:

name

withOnInactiveMarkAs

public ScriptActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: 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.

Overrides:

ScriptActivity.withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

withPolicy

public ScriptActivity withPolicy(ActivityPolicy policy)

Set the policy property: Activity policy.

Overrides:

ScriptActivity.withPolicy(ActivityPolicy policy)

Parameters:

policy

withReturnMultistatementResult

public ScriptActivity withReturnMultistatementResult(Object returnMultistatementResult)

Set the returnMultistatementResult property: Enable to retrieve result sets from multiple SQL statements and the number of rows affected by the DML statement. Supported connector: SnowflakeV2. Type: boolean (or Expression with resultType boolean).

Parameters:

returnMultistatementResult - the returnMultistatementResult value to set.

Returns:

the ScriptActivity object itself.

withScriptBlockExecutionTimeout

public ScriptActivity withScriptBlockExecutionTimeout(Object scriptBlockExecutionTimeout)

Set the scriptBlockExecutionTimeout property: ScriptBlock execution timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Parameters:

scriptBlockExecutionTimeout - the scriptBlockExecutionTimeout value to set.

Returns:

the ScriptActivity object itself.

withScripts

public ScriptActivity withScripts(List<ScriptActivityScriptBlock> scripts)

Set the scripts property: Array of script blocks. Type: array.

Parameters:

scripts - the scripts value to set.

Returns:

the ScriptActivity object itself.

withState

public ScriptActivity withState(ActivityState state)

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

Overrides:

ScriptActivity.withState(ActivityState state)

Parameters:

state

withUserProperties

public ScriptActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

ScriptActivity.withUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

Applies to