Skip to content

Commit 7608489

Browse files
authored
Merge branch 'live' into patch-2
2 parents 08fa065 + ed423b9 commit 7608489

File tree

179 files changed

+2496
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+2496
-737
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ _repo.*/
99
settings.json
1010

1111
# Folder config file
12-
[Dd]esktop.ini
12+
[Dd]esktop.ini
13+
/.vs/slnx.sqlite
14+
/.vs/powerapps-docs-pr/v16/.suo
15+
/.vs/VSWorkspaceState.json

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "powerapps-docs/maker/common-data-service/how-managed-solutions-merged.md",
5+
"redirect_url": "https://docs.microsoft.com/power-platform/alm/how-managed-solutions-merged",
6+
"redirect_document_id": "false"
7+
},
8+
{
9+
"source_path": "powerapps-docs/maker/common-data-service/use-solutions-for-your-customizations.md",
10+
"redirect_url": "https://docs.microsoft.com/power-platform/alm/use-solutions-for-your-customizations",
11+
"redirect_document_id": "false"
12+
},
313
{
414
"source_path": "powerapps-docs/user/run-app-client.md",
515
"redirect_url": "run-canvas-and-model-apps-on-mobile",

powerapps-docs/developer/common-data-service/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
href: use-fetchxml-left-outer-join-query-records-not-in.md
2828
- name: Page large result sets with FetchXML
2929
href: org-service/page-large-result-sets-with-fetchxml.md
30+
- name: "Use SQL to query data (Preview)"
31+
href: cds-sql-query.md
3032
- name: Saved Queries
3133
href: saved-queries.md
3234
- name: Query Hierarchical data
@@ -135,6 +137,8 @@
135137
href: data-import-entities.md
136138
- name: Data Export Service
137139
href: data-export-service.md
140+
- name: Migrate data between environments using OData dataflows
141+
href: cds-odata-dataflows-migration.md
138142
- name: Synchronize data
139143
href: data-synchronization.md
140144
items:

powerapps-docs/developer/common-data-service/build-tools-overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Use Power Apps build tools to automate common build and deployment tasks related
2828
> - Power Apps build tools is a preview feature.
2929
> - [!INCLUDE [cc-preview-features-definition](../../includes/cc-preview-features-definition.md)]
3030
31+
For more information about using the build tools with application lifecycle management see [Power Apps build tools for Azure DevOps](/power-platform/alm/devops-build-tools).
3132

3233
## What are Power Apps build tools?
3334

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
title: Migrate data between Common Data Service environments using the dataflows OData connector
3+
author: denisem-msft
4+
ms.reviewer: "nabuthuk"
5+
description: Migrate data between Common data Service environments using dataflows OData connector.
6+
ms.date: 05/05/2020
7+
ms.service: powerapps
8+
ms.topic: "article"
9+
ms.author: demora
10+
search.app:
11+
- PowerApps
12+
---
13+
14+
# Migrate data between Common Data Service environments using the dataflows OData connector
15+
16+
Common Data Service [Web API](/powerapps/developer/common-data-service/webapi/overview) works with any technology that supports OData and OAuth. There are many options available to move data in and out of Common Data Service. OData connector is one of the dataflows, which is designed to support migration and synchronization of large datasets in Common Data Service.
17+
18+
In this article, we walk you through how to migrate data between Common Data Service environments using the dataflows OData connector.
19+
20+
## Prerequisites
21+
22+
- System Administrator or System Customizer security role permission on both source and the target environments.
23+
24+
- Power Apps, Power Automate, or Common Data Service license (per app or per user).
25+
26+
- Two Common Data Service [environments with database](/power-platform/admin/create-environment#create-an-environment-with-a-database).
27+
28+
## Scenarios
29+
30+
- A one-time cross-environment or cross-tenant migration is needed (for example, geo-migration)
31+
32+
- Developer needs to update an app that is being used in production. Test data is needed in their development environment to easily build out changes.
33+
34+
## Step 1: Plan out the dataflow
35+
36+
1. Identify the source and target environments.
37+
38+
- The **source environment** is where the data is migrated from.
39+
40+
- The **target environment** is where the data is migrated to.
41+
42+
1. Ensure that the entities are already defined in the target environment. Ideally both environments should have the same entities defined with the same solution.
43+
44+
1. When importing relationships, multiple dataflows are required.
45+
46+
One (parent/independent) to many (children/dependent) entities require separate dataflows. Configure the parent dataflow to run before any child entities, since the data in the parent needs to be loaded first to correctly map to the fields in the corresponding child entities.
47+
48+
## Step 2: Get the OData endpoint
49+
50+
Common Data Service provides an OData endpoint that does not require any additional configuration to authenticate with the dataflows connector. It is relatively easy process to connect to the source environment.
51+
52+
This article will walk through how to set up a new dataflow with the OData connector. See, [Creating dataflows](https://docs.microsoft.com/powerapps/maker/common-data-service/create-and-use-dataflows) article for connecting to all data sources supported by dataflows.
53+
54+
From the **source** environment, get the [OData endpoint](https://docs.microsoft.com/powerapps/developer/common-data-service/view-download-developer-resources) (aka Service Root URL) for that environment:
55+
56+
1. Sign into [Power Apps](https://make.powerapps.com).
57+
58+
1. Select the required source environment from the top-right corner.
59+
60+
1. Select the Settings (gear) icon in the top-right corner, and select **Advanced Settings**.
61+
62+
1. On the **Settings** page, select the drop-down arrow next to ****Settings**, and select **Customizations**.
63+
64+
1. On the **Customizations** page, select **Developer Resources**.
65+
66+
1. Copy the **Service Root URL** to notepad.
67+
68+
> [!div class="mx-imgBorder"]
69+
> ![Copy the service root URL in the developer resources](./media/get-odata-endpoint-url.png)
70+
71+
## Step 3: Create a new OData dataflow
72+
73+
In the **target** environment, create a new dataflow with the OData connector.
74+
75+
1. Sign into [Power Apps](https://make.powerapps.com).
76+
77+
1. Select the required target environment from the top-right corner.
78+
79+
1. In the left navigation pane, expand the **Data** menu, and select **Dataflows**.
80+
81+
1. Select **New dataflow** to create a new dataflow. Provide a meaningful name for the dataflow. Select **Create**.
82+
> [!div class="mx-imgBorder"]
83+
> ![Prompt for a new dataflow](./media/enter-name-for-new-dataflow.png)
84+
85+
1. Select the **OData** connector.
86+
87+
> [!div class="mx-imgBorder"]
88+
> ![Select OData source](media/select-odata-data-source.png)
89+
90+
1. In the Connection Settings dialog box, type the field values:
91+
92+
> [!div class="mx-imgBorder"]
93+
> ![Confirm the field values are correct](./media/enter-odata-connector-parameters.png)
94+
95+
96+
| Field | Description |
97+
|--|--|
98+
| URL | Provide the Service Root URL in the URL field of the connection settings |
99+
| Connection | Create new connection. This will be automatically chosen if you have not made an OData connection in dataflows before. |
100+
| Connection name | Optionally, rename the connection name, but a value is automatically populated | |
101+
| On-premise data gateway | None. An on-premises data gateway is not needed for connections to this cloud service. |
102+
| Authentication kind | Organizational account. Select the Sign in button to open the login dialog that authenticates the account associated with the connection. |
103+
104+
> [!IMPORTANT]
105+
> Disable pop-up and cookies blocker in your browser in order to configure the Azure AD authentication. This is orthogonal to the fact that you are using the Common Data Service OData endpoint or any other OAuth based authentication data source.
106+
107+
1. Select **Next** in the bottom right.
108+
109+
## Step 4: Select and transform data with the Power Query
110+
111+
Use Power Query to select the tables and also transform data as per your requirement.
112+
113+
First, select the entities that need to be transferred. You can browse all entities in the source environment and preview some of the data in each entity.
114+
115+
> [!div class="mx-imgBorder"]
116+
> ![Power query navigator](./media/edit-queries-for-selected-entities.png)
117+
118+
1. Select one or multiple entities as needed, then select **Transform data**.
119+
120+
> [!NOTE]
121+
> When importing relationships, remember that the parent entity dataflow need to be imported before the child ones. The data for the child dataflow will require data to be in the parent entity for it to correctly map, otherwise it might throw an error.
122+
123+
1. In the **Power Query - Edit queries** window, you can transform the query before import.
124+
125+
- If you are only migrating data, there should not be a need to modify anything here.
126+
127+
- Reducing the number of unnecessary columns will improve the dataflow performance for larger data sets.
128+
129+
> [!TIP]
130+
> You can go back to choose more tables in the **Get data** ribbon option for the same OData connector.
131+
132+
1. Select **Next** in the bottom right.
133+
134+
## Step 5: Configure target environment settings
135+
136+
This section describes how to define the target environment settings.
137+
138+
### Step 5.1: Map entities
139+
140+
For each entity chosen, select the behavior for importing that entity in these settings and select **Next**.
141+
142+
> [!div class="mx-imgBorder"]
143+
> ![Map entities](./media/map-entities-to-target.png)
144+
145+
- **Load to existing Entity (recommended)**
146+
147+
- The dataflow syncs data from the source environment's entity to the target environment, and the same entity schema is already defined in the target environment.
148+
149+
- Ideally, use the same solution in both target and source environments to make data transfer seamless. Another advantage to having a pre-defined entity is more control over which solution the entity is defined in and the prefix.
150+
151+
- Choose the **Delete rows that no longer exist in the query output**. This ensures that the relationships will map correctly because it maintains the values for the lookups.
152+
153+
- If the schema is identical in both source and target tables, you can select the **Auto map** button to quickly map the fields.
154+
155+
- Requires a key configuration in the target environment (as the unique identifier fields is not available to modify).
156+
157+
- **Load to new entity (not recommended)**
158+
159+
- Ideally there should be an entity pre-defined in the target environment from the same solution import as the source environment. However, there are cases where this might not be feasible, so there is this option to choose if there is no existing entity to load to.
160+
161+
- It creates a new custom entity in the target environment's default solution.
162+
163+
- There is an option to **Do not load**, but do not include entities in the dataflow that are not being loaded. You can select **Back** from this menu to return to the Power Query menu and remove the entities that are not needed.
164+
165+
### Step 5.2: Refresh settings
166+
167+
Select **Refresh manually** since this is a one-time migration ad select **Create**.
168+
169+
## Step 6: Run the dataflow
170+
171+
The initial dataflow load initiates when you select the **Create** button.
172+
173+
> [!div class="mx-imgBorder"]
174+
> ![Refresh manually](./media/initiate-dataflow-process.png)
175+
176+
You can manually initiate a dataflow by selecting **(...)** in the dataflows list. Make sure to run dependent dataflows after the parent flows have completed.
177+
178+
> [!div class="mx-imgBorder"]
179+
> ![Refresh manually](./media/refresh-dataflow-manually.png)
180+
181+
## Tips
182+
183+
- Try out one entity first to walk through the steps, then build out all the dataflows.
184+
185+
- If there are more entities that contain larger amounts of data, consider configuring multiple separate dataflows for individual entities.
186+
187+
- One to many relationships will require separate dataflows for each entity. Configure and run the parent (aka one, or independently) entity dataflow before the child (aka many, or dependent) entity.
188+
189+
- If there are errors with the dataflow refresh, you can view the refresh history in the **(...)** menu in the dataflows list and download each refresh log.
190+
191+
## Limitations
192+
193+
- Many to many relationship data imports are not supported.
194+
195+
- Parent dataflows must be manually configured to run before child dataflows.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: "Use SQL to query data (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "Learn how to query Common Data Service entity data using SQL." # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.custom: ""
5+
ms.date: 05/05/2020
6+
ms.reviewer: "pehecke"
7+
ms.service: powerapps
8+
ms.topic: "article"
9+
author: "phecke" # GitHub ID
10+
ms.author: "pehecke" # MSFT alias of Microsoft employees only
11+
manager: "kvivek" # MSFT alias of manager or PM counterpart
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
# Use SQL to query data (Preview)
20+
21+
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
22+
23+
A SQL data connection is available on the Common Data Service endpoint. The SQL connection provides read-only access to the entity data of the target Common Data Service environment. This allows you to write and execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.
24+
25+
> [!IMPORTANT]
26+
> - This is a preview feature, and isn't available in all regions.
27+
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
28+
29+
## Applications support
30+
31+
You can use the **Analyze in Power BI** option (**Data** > **Entities** > **Analyze in Power BI**) in Power Apps (https://make.powerapps.com) to use the SQL connection feature to analyze data in Power BI Desktop. More information: [View entity data in Power BI Desktop](/powerapps/maker/common-data-service/view-entity-data-power-bi)
32+
33+
> [!NOTE]
34+
> If you don't have the **Analyze in Power BI** option in your Power Apps environment, you don't yet have access to the SQL connection feature.
35+
36+
You can also use [SQL Server Management Studio](/sql/ssms/download-sql-server-management-studio-ssms) (SSMS) version 18.4 or later with the Common Data Service endpoint SQL connection. Examples of using SSMS with the SQL data connection are provided below.
37+
38+
![Expanded account table](media/ssms-table-expanded.PNG)
39+
40+
## Security and authentication
41+
42+
The Common Data Service endpoint SQL connection uses the Common Data Service security model for data access. Data can be obtained for all entities to which a user has access to in Common Data Service.
43+
44+
Only Azure Active Directory authentication is supported. SQL authentication and Windows authentication are not supported. Below is an example of how to logon to the SQL connection in SSMS. Notice the server name is the organization address URL followed by a comma and the port value of 5558.
45+
46+
![Connec dialog](media/ssms-connect-dialog.PNG)
47+
48+
## Example entity data queries
49+
50+
Below are a couple of example queries composed in SSMS. The first image shows a simple query using aliases and result ordering.
51+
52+
```tsql
53+
select top 5 a.name as [VIP customer], a.address1_postalcode as [ZIP code] from account a order by a.address1_postalcode desc
54+
```
55+
56+
![Simple query using aliases and ordering](media/ssms-simple-query.PNG)
57+
58+
This next query shows a JOIN.
59+
60+
```tsql
61+
select name, fullname from account a inner join contact c on a.primarycontactid = c.contactid
62+
```
63+
64+
![Another query using a JOIN](media/ssms-join-query.PNG)
65+
66+
## Supported operations and data types
67+
68+
The list of supported SQL operations includes:
69+
70+
- Batch operations
71+
- SELECT
72+
- Aggregation functions (i.e., Count() and Max() functions)
73+
- UNIONs and JOINs
74+
- Filtering
75+
76+
Any operation that attempts to modify data (i.e., INSERT, UPDATE) will not work as this is a read-only SQL data connection. Common Data Service option sets are represented as \<OptionSet\>Name and \<OptionSet\>Label in a result set.
77+
78+
The following Common Data Service datatypes are not supported with the SQL connection: binary, image,
79+
ntext, sql_variant, varbinary, virtual, HierarchyId, managedproperty, file, xml, partylist, timestamp.
80+
81+
### See also
82+
83+
[Use FetchXML to construct a query](use-fetchxml-construct-query.md)

powerapps-docs/developer/common-data-service/checker/webapi/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ search.app:
2525

2626
The Power Apps checker web API provides a mechanism to run static analysis checks against customizations and extensions to the Common Data Service platform. It is available for makers and developers to perform rich static analysis checks on their solutions against a set of best practice rules to quickly identify problematic patterns. The service provides the logic for the [solution checker feature](../../../../maker/common-data-service/use-powerapps-checker.md) in the Power Apps maker [portal](https://make.powerapps.com) and is included as part of the automation for [applications submitted to AppSource](../../publish-app-appsource.md). Interacting with the service directly in this manner allows for analysis of solutions that are included as part of on-premise (all supported versions) and online environments.
2727

28+
For information about using the checker service from PowerShell code see [Work with solutions using PowerShell](/power-platform/alm/powershell-api).
29+
2830
<a name="bkmk_altApproaches"></a>
2931

3032
## Alternative approaches

powerapps-docs/developer/common-data-service/introduction-solutions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.devlang: na
1313
ms.topic: article
1414
ms.reviewer: "pehecke"
1515
ms.workload: na
16-
ms.date: 01/28/2019
16+
ms.date: 05/06/2020
1717
ms.author: jdaly
1818
search.audienceType:
1919
- developer
@@ -31,7 +31,7 @@ Every customization that you make to Common Data Service, or to a previously ins
3131
If you intend to transport customizations or extensions between different Common Data Service environments or distribute solutions using AppSource, you must understand the solution framework.
3232

3333
> [!NOTE]
34-
> For detailed information about how to effectively use solutions for a successful application lifecycle management (ALM) implementation, see [Whitepaper: Solution Lifecycle Management](https://www.microsoft.com/download/details.aspx?id=57777)
34+
> For detailed information about how to effectively use solutions for a successful application lifecycle management (ALM) implementation, see [Application lifecycle management (ALM) with Microsoft Power Platform](/power-platform/alm).
3535
3636
## Managed and unmanaged solutions
3737

Loading
Loading

0 commit comments

Comments
 (0)