update_data_integration_flow
¶
update_data_integration_flow(
instance_id: UUID,
name: DataIntegrationFlowName,
*,
config_overrides: Optional[SupplyChainClientConfig] = None,
sources: Optional[DataIntegrationFlowSourceList] = None,
transformation: Optional[DataIntegrationFlowTransformation] = None,
target: Optional[DataIntegrationFlowTarget] = None,
) -> UpdateDataIntegrationFlowResponse
Enables you to programmatically update an existing data pipeline to ingest data from the source systems such as, Amazon S3 buckets, to a predefined Amazon Web Services Supply Chain dataset (product, inbound_order) or a temporary dataset along with the data transformation query provided with the API.
Parameters:
-
instance_id(UUID) –The Amazon Web Services Supply Chain instance identifier.
-
name(DataIntegrationFlowName) –The name of the DataIntegrationFlow to be updated.
-
sources(Optional[DataIntegrationFlowSourceList], default:None) –The new source configurations for the DataIntegrationFlow.
-
transformation(Optional[DataIntegrationFlowTransformation], default:None) –The new transformation configurations for the DataIntegrationFlow.
-
target(Optional[DataIntegrationFlowTarget], default:None) –The new target configurations for the DataIntegrationFlow.
Raises:
-
AccessDeniedException–You do not have the required privileges to perform this action.
-
ConflictException–Updating or deleting a resource can cause an inconsistent state.
-
InternalServerException–Unexpected error during processing of request.
-
ResourceNotFoundException–Request references a resource which does not exist.
-
ServiceQuotaExceededException–Request would cause a service quota to be exceeded.
-
ThrottlingException–Request was denied due to request throttling.
-
ValidationException–The input does not satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Successful UpdateDataIntegrationFlow for s3 to dataset flow to update SQL transformation
>>> client.update_data_integration_flow(instance_id='8850c54e-e187-4fa7-89d4-6370f165174d', name='testStagingFlow', sources=[{'sourceType': 'S3', 'sourceName': 'testSourceName', 's3Source': {'bucketName': 'aws-supply-chain-data-b8c7bb28-a576-4334-b481-6d6e8e47371f', 'prefix': 'example-prefix'}}], transformation={'transformationType': 'SQL', 'sqlTransformation': {'query': "SELECT connection_id, bukrs AS id, txtmd AS description FROM testSourceName WHERE langu = 'E'"}}, target={'targetType': 'DATASET', 'datasetTarget': {'datasetIdentifier': 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset'}})
Successful UpdateDataIntegrationFlow for dataset to dataset flow to update sources
>>> client.update_data_integration_flow(instance_id='8850c54e-e187-4fa7-89d4-6370f165174d', name='trading-partner', sources=[{'sourceType': 'DATASET', 'sourceName': 'testSourceName1', 'datasetSource': {'datasetIdentifier': 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset1'}}, {'sourceType': 'DATASET', 'sourceName': 'testSourceName2', 'datasetSource': {'datasetIdentifier': 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/default/datasets/my_staging_dataset2_updated'}}], transformation={'transformationType': 'SQL', 'sqlTransformation': {'query': 'SELECT S1.id AS id, S1.poc_org_unit_description AS description, S1.company_id AS company_id, S1.tpartner_type AS tpartner_type, S1.geo_id AS geo_id, S1.eff_start_date AS eff_start_date, S1.eff_end_date AS eff_end_date FROM testSourceName1 AS S1 LEFT JOIN testSourceName2 as S2 ON S1.id=S2.id'}}, target={'targetType': 'DATASET', 'datasetTarget': {'datasetIdentifier': 'arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/namespaces/asc/datasets/trading_partner', 'options': {'loadType': 'REPLACE', 'dedupeRecords': True, 'dedupeStrategy': {'type': 'FIELD_PRIORITY', 'fieldPriority': {'fields': [{'name': 'eff_start_date', 'sortOrder': 'ASC'}]}}}}})
Source code in docs_src/capo_supplychain/_services/supply_chain.py
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 | |