Skip to content

Commit 8c462ad

Browse files
authored
Merge pull request #104608 from linda33wj/master
Update ADF copy content - new feature release
2 parents 50ead2f + cf40b87 commit 8c462ad

File tree

4 files changed

+50
-3
lines changed

4 files changed

+50
-3
lines changed

articles/data-factory/connector-azure-blob-storage.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: data-factory
99
ms.workload: data-services
1010
ms.topic: conceptual
1111
ms.custom: seo-lt-2019
12-
ms.date: 01/16/2020
12+
ms.date: 02/17/2020
1313
---
1414

1515
# Copy and transform data in Azure Blob storage by using Azure Data Factory
@@ -360,6 +360,7 @@ The following properties are supported for Azure Blob under `storeSettings` sett
360360
| ------------------------ | ------------------------------------------------------------ | --------------------------------------------- |
361361
| type | The type property under `storeSettings` must be set to **AzureBlobStorageReadSettings**. | Yes |
362362
| recursive | Indicates whether the data is read recursively from the subfolders or only from the specified folder. Note that when recursive is set to true and the sink is a file-based store, an empty folder or subfolder isn't copied or created at the sink. Allowed values are **true** (default) and **false**. | No |
363+
| prefix | Prefix for the blob name under the given container configured in dataset to filter source blobs. Blobs whose name starts with this prefix are selected. <br>Applies only when `wildcardFolderPath` and `wildcardFileName` properties are not specified. | No |
363364
| wildcardFolderPath | The folder path with wildcard characters under the given container configured in dataset to filter source folders. <br>Allowed wildcards are: `*` (matches zero or more characters) and `?` (matches zero or single character); use `^` to escape if your actual folder name has wildcard or this escape char inside. <br>See more examples in [Folder and file filter examples](#folder-and-file-filter-examples). | No |
364365
| wildcardFileName | The file name with wildcard characters under the given container + folderPath/wildcardFolderPath to filter source files. <br>Allowed wildcards are: `*` (matches zero or more characters) and `?` (matches zero or single character); use `^` to escape if your actual folder name has wildcard or this escape char inside. See more examples in [Folder and file filter examples](#folder-and-file-filter-examples). | Yes if `fileName` is not specified in dataset |
365366
| modifiedDatetimeStart | Files filter based on the attribute: Last Modified. The files will be selected if their last modified time are within the time range between `modifiedDatetimeStart` and `modifiedDatetimeEnd`. The time is applied to UTC time zone in the format of "2018-12-01T05:00:00Z". <br> The properties can be NULL which mean no file attribute filter will be applied to the dataset. When `modifiedDatetimeStart` has datetime value but `modifiedDatetimeEnd` is NULL, it means the files whose last modified attribute is greater than or equal with the datetime value will be selected. When `modifiedDatetimeEnd` has datetime value but `modifiedDatetimeStart` is NULL, it means the files whose last modified attribute is less than the datetime value will be selected. | No |
@@ -420,6 +421,7 @@ The following properties are supported for Azure Blob under `storeSettings` sett
420421
| ------------------------ | ------------------------------------------------------------ | -------- |
421422
| type | The type property under `storeSettings` must be set to **AzureBlobStorageWriteSettings**. | Yes |
422423
| copyBehavior | Defines the copy behavior when the source is files from a file-based data store.<br/><br/>Allowed values are:<br/><b>- PreserveHierarchy (default)</b>: Preserves the file hierarchy in the target folder. The relative path of source file to source folder is identical to the relative path of target file to target folder.<br/><b>- FlattenHierarchy</b>: All files from the source folder are in the first level of the target folder. The target files have autogenerated names. <br/><b>- MergeFiles</b>: Merges all files from the source folder to one file. If the file or blob name is specified, the merged file name is the specified name. Otherwise, it's an autogenerated file name. | No |
424+
| blockSizeInMB | Specify the block size in MB used to write data to block blobs. Learn more [about Block Blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs). <br/>Allowed value is **between 4 and 100 MB**. <br/>By default, ADF automatically determine the block size based on your source store type and data. For non-binary copy into Blob, the default block size is 100 MB so as to fit in at most 4.95 TB data. It may be not optimal when your data is not large, especially when you use Self-hosted Integration Runtime with poor network resulting in operation timeout or performance issue. You can explicitly specify a block size, while ensure blockSizeInMB*50000 is big enough to store the data, otherwise copy activity run will fail. | No |
423425
| maxConcurrentConnections | The number of the connections to connect to storage store concurrently. Specify only when you want to limit the concurrent connection to the data store. | No |
424426

425427
**Example:**

articles/data-factory/connector-azure-data-lake-storage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: data-factory
1010
ms.workload: data-services
1111
ms.topic: conceptual
1212
ms.custom: seo-lt-2019
13-
ms.date: 01/16/2020
13+
ms.date: 02/17/2020
1414
---
1515

1616
# Copy and transform data in Azure Data Lake Storage Gen2 using Azure Data Factory
@@ -309,6 +309,7 @@ The following properties are supported for Data Lake Storage Gen2 under `storeSe
309309
| ------------------------ | ------------------------------------------------------------ | -------- |
310310
| type | The type property under `storeSettings` must be set to **AzureBlobFSWriteSettings**. | Yes |
311311
| copyBehavior | Defines the copy behavior when the source is files from a file-based data store.<br/><br/>Allowed values are:<br/><b>- PreserveHierarchy (default)</b>: Preserves the file hierarchy in the target folder. The relative path of the source file to the source folder is identical to the relative path of the target file to the target folder.<br/><b>- FlattenHierarchy</b>: All files from the source folder are in the first level of the target folder. The target files have autogenerated names. <br/><b>- MergeFiles</b>: Merges all files from the source folder to one file. If the file name is specified, the merged file name is the specified name. Otherwise, it's an autogenerated file name. | No |
312+
| blockSizeInMB | Specify the block size in MB used to write data to ADLS Gen2. Learn more [about Block Blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs). <br/>Allowed value is **between 4 and 100 MB**. <br/>By default, ADF automatically determine the block size based on your source store type and data. For non-binary copy into ADLS Gen2, the default block size is 100 MB so as to fit in at most 4.95 TB data. It may be not optimal when your data is not large, especially when you use Self-hosted Integration Runtime with poor network resulting in operation timeout or performance issue. You can explicitly specify a block size, while ensure blockSizeInMB*50000 is big enough to store the data, otherwise copy activity run will fail. | No |
312313
| maxConcurrentConnections | The number of connections to connect to the data store concurrently. Specify only when you want to limit the concurrent connection to the data store. | No |
313314

314315
**Example:**

articles/data-factory/connector-sap-hana.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: data-factory
1010
ms.workload: data-services
1111
ms.topic: conceptual
1212
ms.custom: seo-lt-2019
13-
ms.date: 09/02/2019
13+
ms.date: 02/17/2020
1414
---
1515

1616
# Copy data from SAP HANA using Azure Data Factory
@@ -37,6 +37,7 @@ Specifically, this SAP HANA connector supports:
3737
- Copying data from any version of SAP HANA database.
3838
- Copying data from **HANA information models** (such as Analytic and Calculation views) and **Row/Column tables**.
3939
- Copying data using **Basic** or **Windows** authentication.
40+
- Parallel copying from a SAP HANA source. See the [Parallel copy from SAP HANA](#parallel-copy-from-sap-hana) section for details.
4041

4142
> [!TIP]
4243
> To copy data **into** SAP HANA data store, use generic ODBC connector. See [SAP HANA sink](connector-odbc.md#sap-hana-sink) with details. Note the linked services for SAP HANA connector and ODBC connector are with different type thus cannot be reused.
@@ -173,12 +174,18 @@ For a full list of sections and properties available for defining activities, se
173174

174175
### SAP HANA as source
175176

177+
>[!TIP]
178+
>To ingest data from SAP HANA efficiently by using data partitioning, learn more from [Parallel copy from SAP HANA](#parallel-copy-from-sap-hana) section.
179+
176180
To copy data from SAP HANA, the following properties are supported in the copy activity **source** section:
177181

178182
| Property | Description | Required |
179183
|:--- |:--- |:--- |
180184
| type | The type property of the copy activity source must be set to: **SapHanaSource** | Yes |
181185
| query | Specifies the SQL query to read data from the SAP HANA instance. | Yes |
186+
| partitionOptions | Specifies the data partitioning options used to ingest data from SAP HANA. Learn more from [Parallel copy from SAP HANA](#parallel-copy-from-sap-hana) section.<br>Allow values are: **None** (default), **PhysicalPartitionsOfTable**, **SapHanaDynamicRange**. Learn more from [Parallel copy from SAP HANA](#parallel-copy-from-sap-hana) section. `PhysicalPartitionsOfTable` can only be used when copying data from a table but not query. <br>When a partition option is enabled (that is, not `None`), the degree of parallelism to concurrently load data from SAP HANA is controlled by the [`parallelCopies`](copy-activity-performance.md#parallel-copy) setting on the copy activity. | False |
187+
| partitionSettings | Specify the group of the settings for data partitioning.<br>Apply when partition option is `SapHanaDynamicRange`. | False |
188+
| partitionColumnName | Specify the name of the source column that will be used by partition for parallel copy. If not specified, the index or the primary key of the table is auto-detected and used as the partition column.<br>Apply when the partition option is `SapHanaDynamicRange`. If you use a query to retrieve the source data, hook `?AdfHanaDynamicRangePartitionCondition` in WHERE clause. See example in [Parallel copy from SAP HANA](#parallel-copy-from-sap-hana) section. | Yes when using `SapHanaDynamicRange` partition. |
182189
| packetSize | Specifies the network packet size (in Kilobytes) to split data to multiple blocks. If you have large amount of data to copy, increasing packet size can increase reading speed from SAP HANA in most cases. Performance testing is recommended when adjusting the packet size. | No.<br>Default value is 2048 (2MB). |
183190

184191
**Example:**
@@ -215,6 +222,43 @@ To copy data from SAP HANA, the following properties are supported in the copy a
215222

216223
If you were using `RelationalSource` typed copy source, it is still supported as-is, while you are suggested to use the new one going forward.
217224

225+
## Parallel copy from SAP HANA
226+
227+
The Data Factory SAP HANA connector provides built-in data partitioning to copy data from SAP HANA in parallel. You can find data partitioning options on the **Source** table of the copy activity.
228+
229+
![Screenshot of partition options](./media/connector-sap-hana/connector-sap-hana-partition-options.png)
230+
231+
When you enable partitioned copy, Data Factory runs parallel queries against your SAP HANA source to retrieve data by partitions. The parallel degree is controlled by the [`parallelCopies`](copy-activity-performance.md#parallel-copy) setting on the copy activity. For example, if you set `parallelCopies` to four, Data Factory concurrently generates and runs four queries based on your specified partition option and settings, and each query retrieves a portion of data from your SAP HANA.
232+
233+
You are suggested to enable parallel copy with data partitioning especially when you ingest large amount of data from your SAP HANA. The following are suggested configurations for different scenarios. When copying data into file-based data store, it's recommended to write to a folder as multiple files (only specify folder name), in which case the performance is better than writing to a single file.
234+
235+
| Scenario | Suggested settings |
236+
| -------------------------------------------------- | ------------------------------------------------------------ |
237+
| Full load from large table. | **Partition option**: Physical partitions of table. <br><br/>During execution, Data Factory automatically detects the physical partition type of the specified SAP HANA table, and choose the corresponding partition strategy:<br>- **Range Partitioning**: Get the partition column and partition ranges defined for the table, then copy the data by range. <br>- **Hash Partitioning**: Use hash partition key as partition column, then partition and copy the data based on ADF calculated ranges. <br>- **Round-Robin Partitioning** or **No Partition**: Use primary key as partition column, then partition and copy the data based on ADF calculated ranges. |
238+
| Load large amount of data by using a custom query. | **Partition option**: Dynamic range partition.<br>**Query**: `SELECT * FROM <TABLENAME> WHERE ?AdfHanaDynamicRangePartitionCondition AND <your_additional_where_clause>`.<br>**Partition column**: Specify the column used to apply dynamic range partition. <br><br>During execution, Data Factory firstly calculates the value ranges of the specified partition column, by evenly distributes the rows in a number of buckets according to the number of distinct partition column values and ADF parallel copy setting, then replaces `?AdfHanaDynamicRangePartitionCondition` with filtering the partition column value range for each partition, and sends to SAP HANA.<br><br>If you want to use multiple columns as partition column, you can concatenate the values of each column as one column in the query and specify it as partition column in ADF, like `SELECT * FROM (SELECT *, CONCAT(<KeyColumn1>, <KeyColumn2>) AS PARTITIONCOLUMN FROM <TABLENAME>) WHERE ?AdfHanaDynamicRangePartitionCondition`. |
239+
240+
**Example: query with physical partitions of a table**
241+
242+
```json
243+
"source": {
244+
"type": "SapHanaSource",
245+
"partitionOption": "PhysicalPartitionsOfTable"
246+
}
247+
```
248+
249+
**Example: query with dynamic range partition**
250+
251+
```json
252+
"source": {
253+
"type": "SapHanaSource",
254+
"query": "SELECT * FROM <TABLENAME> WHERE ?AdfHanaDynamicRangePartitionCondition AND <your_additional_where_clause>",
255+
"partitionOption": "SapHanaDynamicRange",
256+
"partitionSettings": {
257+
"partitionColumnName": "<Partition_column_name>"
258+
}
259+
}
260+
```
261+
218262
## Data type mapping for SAP HANA
219263

220264
When copying data from SAP HANA, the following mappings are used from SAP HANA data types to Azure Data Factory interim data types. See [Schema and data type mappings](copy-activity-schema-and-type-mapping.md) to learn about how copy activity maps the source schema and data type to the sink.
17.1 KB
Loading

0 commit comments

Comments
 (0)