À l'aide de la tâche "Mappage de données", parcourez les éléments d'un tableau de chaînes et appliquez des fonctions de transformation pour convertir chaque valeur de chaîne en majuscules.
Cliquez sur Intégrations dans le menu de navigation de gauche pour ouvrir la page Intégrations.
Sélectionnez une intégration existante ou créez-en une en cliquant sur Créer une intégration.
Si vous créez une intégration :
Saisissez un nom et une description dans la boîte de dialogue Créer une intégration.
Sélectionnez une région pour l'intégration.
Sélectionnez un compte de service pour l'intégration. Vous pouvez modifier ou mettre à jour les informations du compte de service d'une intégration à tout moment depuis le volet infoRésumé de l'intégration de la barre d'outils d'intégration.
Cliquez sur Créer.
Cela entraîne son ouverture dans l'éditeur d'intégrations.
Dans l'éditeur d'intégration, cliquez sur publishMenu Importer/Télécharger, puis sélectionnez Importer l'intégration.
Dans la boîte de dialogue de l'explorateur de fichiers, sélectionnez le fichier que vous avez enregistré à l'étape 1, puis cliquez sur Ouvrir.
Une nouvelle version de l'intégration est créée à l'aide du fichier importé.
Dans l'éditeur d'intégrations, cliquez sur Tester.
Cliquez sur Tester l'intégration. L'intégration est exécutée et le résultat d'exécution s'affiche dans le volet Tester l'intégration.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eThis guide demonstrates how to convert an array of strings to uppercase using Application Integration's Data Mapping task.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves using the \u003ccode\u003eFOR_EACH\u003c/code\u003e function to iterate through each string in the input array, and then using the \u003ccode\u003eTO_UPPERCASE\u003c/code\u003e function to perform the string transformation.\u003c/p\u003e\n"],["\u003cp\u003eAn example code sample, provided in JSON format, details the configuration for the integration, including trigger and task settings.\u003c/p\u003e\n"],["\u003cp\u003eInstructions are included for uploading and running the provided integration sample, which includes saving the sample as a .json file and uploading it via the Application Integration interface.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einputStringArray\u003c/code\u003e integration parameter is set to ["one", "two", "three"] to be transformed and result in an \u003ccode\u003eoutputStringArray\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Convert a string to uppercase\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nConvert a string to uppercase\n=============================\n\n\nUsing the Data Mapping task, iterate through the elements of a string array and apply transformation functions to convert each string value to uppercase.\n\nCode sample\n-----------\n\n {\n \"triggerConfigs\": [{\n \"label\": \"API Trigger\",\n \"startTasks\": [{\n \"taskId\": \"1\"\n }],\n \"properties\": {\n \"Trigger name\": \"test_string_case_conversion_API_1\"\n },\n \"triggerType\": \"API\",\n \"triggerNumber\": \"1\",\n \"triggerId\": \"api_trigger/test_string_case_conversion_API_1\"\n }],\n \"taskConfigs\": [{\n \"task\": \"FieldMappingTask\",\n \"taskId\": \"1\",\n \"parameters\": {\n \"FieldMappingConfigTaskParameterKey\": {\n \"key\": \"FieldMappingConfigTaskParameterKey\",\n \"value\": {\n \"jsonValue\": \"{\\n \\\"@type\\\": \\\"type.googleapis.com/enterprise.crm.eventbus.proto.FieldMappingConfig\\\",\\n \\\"mappedFields\\\": [{\\n \\\"inputField\\\": {\\n \\\"fieldType\\\": \\\"STRING_ARRAY\\\",\\n \\\"transformExpression\\\": {\\n \\\"initialValue\\\": {\\n \\\"referenceValue\\\": \\\"$inputStringArray$\\\"\\n },\\n \\\"transformationFunctions\\\": [{\\n \\\"functionType\\\": {\\n \\\"stringArrayFunction\\\": {\\n \\\"functionName\\\": \\\"FOR_EACH\\\"\\n }\\n },\\n \\\"parameters\\\": [{\\n \\\"initialValue\\\": {\\n \\\"literalValue\\\": {\\n \\\"protoValue\\\": {\\n \\\"@type\\\": \\\"type.googleapis.com/enterprise.crm.eventbus.proto.TransformExpression\\\",\\n \\\"initialValue\\\": {\\n \\\"referenceValue\\\": \\\"~x\\\"\\n },\\n \\\"transformationFunctions\\\": [{\\n \\\"functionType\\\": {\\n \\\"stringFunction\\\": {\\n \\\"functionName\\\": \\\"TO_UPPERCASE\\\"\\n }\\n }\\n }]\\n }\\n }\\n }\\n }]\\n }, {\\n \\\"functionType\\\": {\\n \\\"jsonFunction\\\": {\\n \\\"functionName\\\": \\\"TO_STRING_ARRAY\\\"\\n }\\n }\\n }]\\n }\\n },\\n \\\"outputField\\\": {\\n \\\"referenceKey\\\": \\\"$outputStringArray$\\\",\\n \\\"fieldType\\\": \\\"STRING_ARRAY\\\",\\n \\\"cardinality\\\": \\\"OPTIONAL\\\"\\n }\\n }]\\n}\"\n }\n }\n },\n \"taskExecutionStrategy\": \"WHEN_ALL_SUCCEED\",\n \"displayName\": \"Data Mapping\"\n }],\n \"integrationParameters\": [{\n \"key\": \"inputStringArray\",\n \"dataType\": \"STRING_ARRAY\",\n \"defaultValue\": {\n \"stringArray\": {\n \"stringValues\": [\"one\", \"two\", \"three\"]\n }\n },\n \"displayName\": \"inputStringArray\"\n }, {\n \"key\": \"outputStringArray\",\n \"dataType\": \"STRING_ARRAY\",\n \"displayName\": \"outputStringArray\"\n }]\n }\n\n### Sample integration flow\n\nThe following image shows a sample layout of the integration editor for this integration code sample.\n\n\nUpload and run the sample integration\n-------------------------------------\n\nTo upload and run the sample integration, do the following steps:\n\n1. Save the [integration sample](#code-sample) as a .json file on your system.\n2. In the Google Cloud console, go to the **Application Integration** page.\n\n [Go to Application Integration](https://console.cloud.google.com/integrations)\n3. Click **Integrations** from the left navigation menu to open the **Integrations** page.\n4. Select an existing integration or create a new integration by clicking **Create integration** .\n\n\n If you are creating a new integration:\n 1. Enter a name and description in the **Create Integration** dialog.\n 2. Select a region for the integration. **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, Click **Enable Region** . See [Enable new region](/application-integration/docs/enable-new-region) for more information.\n 3. Select a service account for the integration. You can change or update the service account details of an integration any time from the info **Integration summary** pane in the integration toolbar. **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.\n 4. Click **Create**.\n\n\n This opens the integration in the *integration editor*.\n5. In the *integration editor* , click publish**Upload/download menu** and then select **Upload integration**.\n6. In the file browser dialog, select the file that you saved in step 1, and then click **Open** .\n\n A new version of the integration is created using the uploaded file.\n7. In the *integration editor* , click **Test**.\n8. Click **Test integration** . This runs the integration and displays the execution result in the **Test Integration** pane."]]