Data Factory > exchange-apply-suggestions β
TIP
The full documentation of the behavior of this task is detailed in the Learning Center.
Requirements β
This task requires the item id attribute available in output of the Data Factory task table-export-items . The export of the item id attribute requires the activation of the feature flag item_export_resource_identifier.
Technical details β
Find below a technical diagram of the task.
Diagram β
mermaid
stateDiagram-v2
classDef xslt fill: #DFFF00
classDef jq fill: #FFBF00
classDef api fill: #EE4B2B
classDef loop fill:#40E0D0
classDef variable fill:#6495ED
classDef terminate fill:#000000,color:#FFFFFF
state count_items <<choice>>
state if_items_ids <<choice>>
state if_suggestions <<choice>>
state if_options <<choice>>
countItems --> count_items
count_items --> terminateTooManyItems:TOO_MANY_ITEMS
count_items --> terminateNoItems:NO_ITEMS
count_items --> extractItemsIDs:OK
extractItemsIDs --> extractItemsIDsConvertOutputToJson
extractItemsIDsConvertOutputToJson --> if_items_ids
if_items_ids --> terminateNoItemsIds:NO_ITEMS_IDS
if_items_ids --> exportSuggestions:ITEMS_IDS_FOUND
exportSuggestions --> sortSuggestionsPerCreatedDateTime
sortSuggestionsPerCreatedDateTime --> getShardID
getShardID --> if_suggestions
if_suggestions --> terminateNoSuggestions:NO_SUGGESTIONS
if_suggestions --> if_options:SUGGESTIONS_FOUND
if_options --> LoopOverSuggestions:NO_OPTIONS_FOUND
LoopOverSuggestions --> getCurrentSuggestion
getCurrentSuggestion --> applySuggestionsAllFields
applySuggestionsAllFields --> endLoopOverSuggestions
endLoopOverSuggestions --> LoopOverSuggestions
endLoopOverSuggestions --> setVariableLoopOutput
setVariableLoopOutput --> ConvertLoopOutput
ConvertLoopOutput --> createReport
createReport --> [*]
if_options --> LoopOverSuggestionsWithOptions:OPTIONS_FOUND
LoopOverSuggestionsWithOptions --> getCurrentSuggestionWithOptions
getCurrentSuggestionWithOptions --> convertSuggestionToXml
convertSuggestionToXml --> createSuggestionApplicationBody
createSuggestionApplicationBody --> createSuggestionApplicationBodyConvertOutputToJson
createSuggestionApplicationBodyConvertOutputToJson --> applySuggestion
applySuggestion --> endLoopOverSuggestionsWithOptions
endLoopOverSuggestionsWithOptions --> LoopOverSuggestionsWithOptions
endLoopOverSuggestionsWithOptions --> setVariableLoopOutputWithOptions
setVariableLoopOutputWithOptions --> ConvertLoopOutput
class countItems,extractItemsIDs,createReport,createSuggestionApplicationBody xslt
class exportSuggestions,applySuggestionsAllFields,applySuggestion api
class extractItemsIDsConvertOutputToJson,sortSuggestionsPerCreatedDateTime,getShardID,getCurrentSuggestion,getCurrentSuggestionWithOptions,createSuggestionApplicationBodyConvertOutputToJson jq
class LoopOverSuggestions,endLoopOverSuggestions,LoopOverSuggestionsWithOptions,endLoopOverSuggestionsWithOptions loop
class terminateTooManyItems,terminateNoItems,terminateNoItemsIds,terminateNoSuggestions terminate
class setVariableLoopOutput,setVariableLoopOutputWithOptions variableLegend β
mermaid
flowchart TB
xslt["XSLT transform"]:::xslt
api["API call"]:::api
jq["JQ transform"]:::jq
loop["Loop element"]:::loop
variable["Set variable"]:::variable
terminate["Terminate"]:::terminate
classDef xslt fill: #DFFF00
classDef jq fill: #FFBF00
classDef api fill: #EE4B2B
classDef loop fill:#40E0D0
classDef variable fill:#6495ED
classDef terminate fill:#000000,color:#FFFFFF