Skip to content

Commit 7c5a71b

Browse files
committed
Add icons
1 parent 6f96eee commit 7c5a71b

File tree

12 files changed

+85
-29
lines changed

12 files changed

+85
-29
lines changed

articles/logic-apps/create-maps-data-transformation-visual-studio-code.md

Lines changed: 85 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ The Data Mapper extension currently works only with schemas in flat folder-struc
4545

4646
- [Same prerequisites for using Visual Studio Code and the Azure Logic Apps (Standard) extension](create-single-tenant-workflows-visual-studio-code.md#prerequisites) to create Standard logic app workflows.
4747

48-
- The latest Data Mapper extension for Visual Studio Code
48+
- The latest **Azure Logic Apps - Data Mapper** extension. You can download and install this extension from inside Visual Studio Code through the Marketplace, or you can find this extension externally on the [Marketplace website](https://marketplace.visualstudio.com/vscode).
4949

50-
- The source and target schema files that describe the data to transform. These files can have either the following formats:
50+
- The source and target schema files that describe the data types to transform. These files can have either the following formats:
5151

5252
- An XML schema definition file with the .xsd file extension
5353
- A JavaScript Object Notation file with the .json file extension
@@ -60,14 +60,6 @@ The Data Mapper extension currently works only with schemas in flat folder-struc
6060

6161
- Sample input data if you want to test the map and check that the transformation works as you expect.
6262

63-
## Add source and target schemas to your project folder
64-
65-
1. Go to your local project folder, and expand the **Artifacts** > **Schemas** folder.
66-
67-
1. Add your source and target schema files to the **Schemas** folder.
68-
69-
In Visual Studio Code, these schema files now also appear in your logic app project.
70-
7163
## Create a data map
7264

7365
1. On the Visual Studio Code left menu, select the **Azure** icon.
@@ -76,21 +68,59 @@ The Data Mapper extension currently works only with schemas in flat folder-struc
7668

7769
1. Provide a name for your data map.
7870

79-
1. Specify your source schema:
71+
1. Specify your source and target schemas by following these steps:
8072

8173
1. On the map surface, select **Add a source schema**.
82-
1. On the **Configure** pane that opens, select **Select existing**, if not already selected.
83-
1. From the source schema list, select your source schema, and then select **Add**.
8474

85-
The map surface now shows the data fields from the source schema.
75+
1. On the **Configure** pane that opens, select **Add new** > **Browse**.
8676

87-
1. Specify your target schema:
77+
1. Find and select your source schema file, and then select **Add**.
78+
79+
[!NOTE]
80+
>
81+
> If your source schema doesn't appear in the **Open** window,
82+
> from the file type list, change **XSD File (\*.xsd)** to **All Files (\*.\*)**.
83+
84+
The map surface now shows the data types from the source schema.
8885

8986
1. On the map surface, select **Add a target schema**.
90-
1. On the **Configure** pane that opens, select **Select existing**, if not already selected.
91-
1. From the target schema list, select your target schema, and then select **Add**.
9287

93-
The map surface now shows data fields from the target schema.
88+
1. On the **Configure** pane that opens, select **Add new** > **Browse**.
89+
90+
1. Find and select your target schema file, and then select **Add**.
91+
92+
[!NOTE]
93+
>
94+
> If your target schema doesn't appear in the **Open** window,
95+
> from the file type list, change **XSD File (\*.xsd)** to **All Files (\*.\*)**.
96+
97+
The map surface now shows data types from the target schema.
98+
99+
> [!NOTE]
100+
>
101+
> You can also add your source and target schema files locally to your
102+
> logic app project in the **Artifacts** > **Schemas** folder, so that
103+
> they appear in Visual Studio Code. In this case, you can specify your
104+
> source and target schema in the Data Mapper tool on the **Configure**
105+
> pane by selecting **Select existing**, rather than **Add new**.
106+
107+
The following table describes the possible data types that might appear in a schema:
108+
109+
| Symbol | Type | Notes |
110+
|--------|------|-------|
111+
| ![Icon representing an Array data type.](media/create-maps-data-transformation-visual-studio-code/array-icon.png) | Array | Contains items or repeating item nodes |
112+
| ![Icon representing a Binary data type.](media/create-maps-data-transformation-visual-studio-code/binary-icon.png) | Binary | |
113+
| ![Icon representing a Bool data type.](media/create-maps-data-transformation-visual-studio-code/bool-icon.png) | Bool | True or false only |
114+
| ![Icon representing a Complex data type.](media/create-maps-data-transformation-visual-studio-code/complex-icon.png) | Complex | An XML object with children properties, similar to the Object JSON type |
115+
| ![Icon representing a DateTime data type.](media/create-maps-data-transformation-visual-studio-code/datetime-icon.png) | DateTime | |
116+
| ![Icon representing a Decimal data type.](media/create-maps-data-transformation-visual-studio-code/decimal-icon.png) | Decimal | |
117+
| ![Icon representing an Integer data type.](media/create-maps-data-transformation-visual-studio-code/integer-icon.png) | Integer | Whole numbers only |
118+
| ![Icon representing the NULL symbol.](media/create-maps-data-transformation-visual-studio-code/null-icon.png) | Null | Not a data type, but appears when an error or an invalid type exists |
119+
| ![Icon representing a Number data type.](media/create-maps-data-transformation-visual-studio-code/number-icon.png) | Number | A JSON integer or decimal |
120+
| ![Icon representing an Object data type.](media/create-maps-data-transformation-visual-studio-code/object-icon.png) | Object | A JSON object with children properties, similar to the Complex XML type |
121+
| ![Icon representing a String data type.](media/create-maps-data-transformation-visual-studio-code/string-icon.png) | String | |
122+
123+
<a name="navigate-map"></a>
94124

95125
## Navigate the map
96126

@@ -103,36 +133,52 @@ To move around the map, you have the following options:
103133
|--------|---------------------|
104134
| **Zoom in** | On the map surface, double select. |
105135
| **Zoom out** | On the map surface, press SHIFT + double select. |
106-
| **Zoom to fit** | |
107-
| **Show (Hide) mini-map** | |
136+
| **Zoom to fit** | None |
137+
| **Show (Hide) mini-map** | None |
108138

109139
- To move up one level on the map, on the breadcrumb path, select a previous level.
110140

111-
<a name="create-basic-mapping"></a>
141+
<a name="select-elements"></a>
112142

113-
## Create a basic mapping relationship
143+
## Select the elements that you want to map
144+
145+
1. On the map surface, from the target schema list, select the target element that you want to map. If that element is a child of a parent element, find and expand the parent first.
114146

115-
For a direct and simple mapping between visible child elements, follow these steps:
147+
The source schema area on the map now shows the option to select a source element.
116148

117-
1. On the map surface, in the target schema area, expand the element that you want to map.
149+
1. From the source schema area, select **Select element**.
118150

119-
1. In the source schema area, select **Select element**. From the element list, select one or more source elements to show them on the map. When you're done, close the source schema window.
151+
1. From the **Source schema** window that appears, select one or more source elements to display on the map.
120152

121-
To add more source elements later, on the map, in the upper left corner, select **Show source schema** (node tree).
153+
- To include the immediate children of a parent, open the parent's shortcut menu, and select **Add children**.
154+
155+
- To include all the children of a parent, including any subsequent parents, open the top-level parent's shortcut menu, and select **Add children (recursive)**.
156+
157+
1. When you're done, close the source schema window. You can always add more source elements later. On the map, in the upper left corner, select **Show source schema** (node tree).
158+
159+
<a name="create-basic-mapping"></a>
160+
161+
## Create a basic mapping relationship
162+
163+
For a direct and simple mapping between elements with the same type, follow these steps:
164+
165+
1. To review what happens in code while you create the mapping, in the map's upper right corner, select **Show code**.
122166

123167
1. Move your pointer over the source element so that both a circle and a plus sign (**+**) appear.
124168

125-
1. Drag a line to the target element and connect the circle that appears.
169+
1. Drag a line to the target element so that the line connects to the circle that appears.
126170

127171
You now have a basic mapping between both elements.
128172

129173
<a name="create-complex-mapping"></a>
130174

131175
## Create a complex mapping relationship
132176

133-
For a more complex transformation, you can create a mapping that uses a function.
177+
| | Any | |
178+
179+
For a more complex transformation, you can create a mapping that uses a function to perform a task or make a decision.
134180

135-
1. [Follow the steps to create a basic mapping relationship](#create-basic-mapping).
181+
1. [Create a basic mapping relationship](#create-basic-mapping).
136182

137183
1. Select the line for the mapping that you created.
138184

@@ -154,6 +200,16 @@ For a more complex transformation, you can create a mapping that uses a function
154200

155201
1. On the function's **Properties** tab, select the data fields to use as the input and scope for the transformation.
156202

203+
<a name="iterate-through-array"></a>
204+
205+
## Create a loop mapping between arrays
206+
207+
If your source and target schemas include arrays, you can create a loop mapping between the items in those arrays.
208+
209+
1. Add the arrays and their Expand the items
210+
211+
1. [Follow the steps to create a basic mapping relationship](#create-basic-mapping) between a pair of matching elements in the source and target schema.
212+
157213
## Save your map
158214

159215
On the map toolbar, select **Save**.
1.18 KB
Loading
725 Bytes
Loading
1.71 KB
Loading
932 Bytes
Loading
1.02 KB
Loading
786 Bytes
Loading
1013 Bytes
Loading
1.24 KB
Loading
1.23 KB
Loading

0 commit comments

Comments
 (0)