Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR datafactory/resource-manager] Chainingtrigger #7005

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
from ._models_py3 import CassandraLinkedService
from ._models_py3 import CassandraSource
from ._models_py3 import CassandraTableDataset
from ._models_py3 import ChainingTrigger
from ._models_py3 import CommonDataServiceForAppsEntityDataset
from ._models_py3 import CommonDataServiceForAppsLinkedService
from ._models_py3 import CommonDataServiceForAppsSink
Expand Down Expand Up @@ -621,6 +622,7 @@
from ._models import CassandraLinkedService
from ._models import CassandraSource
from ._models import CassandraTableDataset
from ._models import ChainingTrigger
from ._models import CommonDataServiceForAppsEntityDataset
from ._models import CommonDataServiceForAppsLinkedService
from ._models import CommonDataServiceForAppsSink
Expand Down Expand Up @@ -1220,6 +1222,7 @@
'CassandraLinkedService',
'CassandraSource',
'CassandraTableDataset',
'ChainingTrigger',
'CommonDataServiceForAppsEntityDataset',
'CommonDataServiceForAppsLinkedService',
'CommonDataServiceForAppsSink',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5961,8 +5961,8 @@ class Trigger(Model):
pipeline run.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: RerunTumblingWindowTrigger, TumblingWindowTrigger,
MultiplePipelineTrigger
sub-classes are: RerunTumblingWindowTrigger, ChainingTrigger,
TumblingWindowTrigger, MultiplePipelineTrigger

Variables are only populated by the server, and will be ignored when
sending a request.
Expand Down Expand Up @@ -6000,7 +6000,7 @@ class Trigger(Model):
}

_subtype_map = {
'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'}
'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'ChainingTrigger': 'ChainingTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'}
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -6526,6 +6526,70 @@ def __init__(self, **kwargs):
self.type = 'CassandraTable'


class ChainingTrigger(Trigger):
"""Trigger that allows the referenced pipeline to depend on other pipeline
runs based on runDimension Name/Value pairs. Upstream pipelines should
declare the same runDimension Name and their runs should have the values
for those runDimensions. The referenced pipeline run would be triggered if
the values for the runDimension match for all upstream pipeline runs.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param description: Trigger description.
:type description: str
:ivar runtime_state: Indicates if trigger is running or not. Updated when
Start/Stop APIs are called on the Trigger. Possible values include:
'Started', 'Stopped', 'Disabled'
:vartype runtime_state: str or
~azure.mgmt.datafactory.models.TriggerRuntimeState
:param annotations: List of tags that can be used for describing the
trigger.
:type annotations: list[object]
:param type: Required. Constant filled by server.
:type type: str
:param pipeline: Required. Pipeline for which runs are created when all
upstream pipelines complete successfully.
:type pipeline: ~azure.mgmt.datafactory.models.TriggerPipelineReference
:param depends_on: Required. Upstream Pipelines.
:type depends_on: list[~azure.mgmt.datafactory.models.PipelineReference]
:param run_dimension: Required. Run Dimension property that needs to be
emitted by upstream pipelines.
:type run_dimension: str
"""

_validation = {
'runtime_state': {'readonly': True},
'type': {'required': True},
'pipeline': {'required': True},
'depends_on': {'required': True},
'run_dimension': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'description': {'key': 'description', 'type': 'str'},
'runtime_state': {'key': 'runtimeState', 'type': 'str'},
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'pipeline': {'key': 'pipeline', 'type': 'TriggerPipelineReference'},
'depends_on': {'key': 'typeProperties.dependsOn', 'type': '[PipelineReference]'},
'run_dimension': {'key': 'typeProperties.runDimension', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ChainingTrigger, self).__init__(**kwargs)
self.pipeline = kwargs.get('pipeline', None)
self.depends_on = kwargs.get('depends_on', None)
self.run_dimension = kwargs.get('run_dimension', None)
self.type = 'ChainingTrigger'


class CloudError(Model):
"""The object that defines the structure of an Azure Data Factory error
response.
Expand Down Expand Up @@ -20081,6 +20145,8 @@ class PipelineResource(SubResource):
:param annotations: List of tags that can be used for describing the
Pipeline.
:type annotations: list[object]
:param run_dimensions: Dimensions emitted by Pipeline.
:type run_dimensions: dict[str, object]
:param folder: The folder that this Pipeline is in. If not specified,
Pipeline will appear at the root level.
:type folder: ~azure.mgmt.datafactory.models.PipelineFolder
Expand All @@ -20106,6 +20172,7 @@ class PipelineResource(SubResource):
'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'},
'concurrency': {'key': 'properties.concurrency', 'type': 'int'},
'annotations': {'key': 'properties.annotations', 'type': '[object]'},
'run_dimensions': {'key': 'properties.runDimensions', 'type': '{object}'},
'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'},
}

Expand All @@ -20118,6 +20185,7 @@ def __init__(self, **kwargs):
self.variables = kwargs.get('variables', None)
self.concurrency = kwargs.get('concurrency', None)
self.annotations = kwargs.get('annotations', None)
self.run_dimensions = kwargs.get('run_dimensions', None)
self.folder = kwargs.get('folder', None)


Expand All @@ -20143,6 +20211,8 @@ class PipelineRun(Model):
:ivar parameters: The full or partial list of parameter name, value pair
used in the pipeline run.
:vartype parameters: dict[str, str]
:ivar run_dimensions: Run dimensions emitted by Pipeline run.
:vartype run_dimensions: dict[str, str]
:ivar invoked_by: Entity that started the pipeline run.
:vartype invoked_by: ~azure.mgmt.datafactory.models.PipelineRunInvokedBy
:ivar last_updated: The last updated timestamp for the pipeline run event
Expand All @@ -20166,6 +20236,7 @@ class PipelineRun(Model):
'is_latest': {'readonly': True},
'pipeline_name': {'readonly': True},
'parameters': {'readonly': True},
'run_dimensions': {'readonly': True},
'invoked_by': {'readonly': True},
'last_updated': {'readonly': True},
'run_start': {'readonly': True},
Expand All @@ -20182,6 +20253,7 @@ class PipelineRun(Model):
'is_latest': {'key': 'isLatest', 'type': 'bool'},
'pipeline_name': {'key': 'pipelineName', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': '{str}'},
'run_dimensions': {'key': 'runDimensions', 'type': '{str}'},
'invoked_by': {'key': 'invokedBy', 'type': 'PipelineRunInvokedBy'},
'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
'run_start': {'key': 'runStart', 'type': 'iso-8601'},
Expand All @@ -20199,6 +20271,7 @@ def __init__(self, **kwargs):
self.is_latest = None
self.pipeline_name = None
self.parameters = None
self.run_dimensions = None
self.invoked_by = None
self.last_updated = None
self.run_start = None
Expand Down Expand Up @@ -27428,6 +27501,10 @@ class TriggerRun(Model):
:ivar triggered_pipelines: List of pipeline name and run Id triggered by
the trigger run.
:vartype triggered_pipelines: dict[str, str]
:ivar run_dimension: Run dimension for which trigger was fired.
:vartype run_dimension: dict[str, str]
:ivar dependency_status: Status of the upstream pipelines.
:vartype dependency_status: dict[str, object]
"""

_validation = {
Expand All @@ -27439,6 +27516,8 @@ class TriggerRun(Model):
'message': {'readonly': True},
'properties': {'readonly': True},
'triggered_pipelines': {'readonly': True},
'run_dimension': {'readonly': True},
'dependency_status': {'readonly': True},
}

_attribute_map = {
Expand All @@ -27451,6 +27530,8 @@ class TriggerRun(Model):
'message': {'key': 'message', 'type': 'str'},
'properties': {'key': 'properties', 'type': '{str}'},
'triggered_pipelines': {'key': 'triggeredPipelines', 'type': '{str}'},
'run_dimension': {'key': 'runDimension', 'type': '{str}'},
'dependency_status': {'key': 'dependencyStatus', 'type': '{object}'},
}

def __init__(self, **kwargs):
Expand All @@ -27464,6 +27545,8 @@ def __init__(self, **kwargs):
self.message = None
self.properties = None
self.triggered_pipelines = None
self.run_dimension = None
self.dependency_status = None


class TriggerRunsQueryResponse(Model):
Expand Down
Loading