示例代码:
{ "name": "UpdateDatePipeline", "type": "Microsoft.DataFactory/factories/pipelines", "properties": { "activities": [ { "name": "LookupActivity", "type": "Lookup", "inputs": [ { "referenceName": "LatestDateDataset", "type": "DatasetReference" } ], "outputs": [ { "referenceName": "latestDate", "type": "DatasetReference" } ], "from": { "query": { "value": "SELECT MAX(Date) as LatestDate FROM Table", "type": "Expression" } }, "firstRowOnly": true }, { "name": "IfActivity", "type": "IfCondition", "inputs": [ { "referenceName": "latestDate", "type": "DatasetReference" } ], "ifFalseActivities": [], "ifTrueActivities": [ { "name": "CopyActivity", "type": "Copy", "inputs": [ { "referenceName": "SourceDataset", "type": "DatasetReference" } ], "outputs": [ { "referenceName": "TargetDataset", "type": "DatasetReference" } ], "source": { "type": "SqlSource", "sqlReaderQuery": "SELECT * FROM Table WHERE Date > '@{activity('latestDate').output.firstRow.LatestDate}'" }, "sink": { "type": "SqlSink" }, "enableMapping": true, "mapping": { "type": "Mapping", "source": { "type