...
To test your rule, perform a dry run of the import. See below.
Example - Remap a WASB location
For WASB sources, you can apply remapping rules during import.
In this example, your import rule must remap the blob host, container, and file location:
Dev Blobhost | storage-wasb-account-dev.blob.core.windows.net |
---|---|
Dev Container | container-dev |
Dev File Location | /projs/work/orders.csv |
Prod Blobhost | storage-wasb-account-prod.blob.core.windows.net |
Prod Container | container-prod |
Prod File Location | /2003/transactions/orders.csv |
You can use the following value import rules to change the blobhost, container, and file paths.
Info |
---|
NOTE: You can specify multiple rules in a single request. Rules are applied in the order that they are listed. Latter rules must factor the results of earlier rules. |
host rule: This rule replaces the blobhost name to use with the new one: storage-wasb-account-prod.blob.core.windows.net
.
userinfo rule: This rule replaces the container name to use with the new one: container-prod
.
fileLocation rule: This rule performs a text substitution to replace the file path. This rule applies to both input and output object file paths.
Request:
Item | v4 APIs | ||
---|---|---|---|
API Endpoint |
| ||
Method |
|
Request Body:
Code Block |
---|
[
{"type":"host","on":"storage-wasb-account-dev.blob.core.windows.net","with":"storage-wasb-account-prod.blob.core.windows.net"},
{"type":"userinfo","on":"container-dev","with":"container-prod"},
{"type":"fileLocation","on":"/projs/work/orders.csv","with":"/2003/transactions/orders.csv"}
] |
Response:
Item | v4 APIs | ||
---|---|---|---|
Status Code - Success | 200 - OK | ||
Response Body | When the new rules are applied, all previously existing rules for the object in the deployment are deleted. The response body contains any rules that have been deleted as part of this request. In the following example, there were no rules, so nothing was deleted:
| ||
Documentation | See
|
To test your rule, perform a dry run of the import. See below.
Example - Remap an ADLS Gen2 location
For ADLs Gen2 sources, you can apply remapping rules during import.
In this example, your import rule must remap the storage account, filesystem, and file location:
Dev Storage Account | storage-adlsgen2-account-dev.blob.core.windows.net |
---|---|
Dev Filesystem | filesystem-dev |
Dev File Location | /projs/work/orders.csv |
Prod Storage Account | storage-adlsgen2-account-prod.blob.core.windows.net |
Prod Filesystem | filesystem-prod |
Prod File Location | /2003/transactions/orders.csv |
You can use the following value import rules to change the storage account, filesystem, and file paths.
Info |
---|
NOTE: You can specify multiple rules in a single request. Rules are applied in the order that they are listed. Latter rules must factor the results of earlier rules. |
host rule: This rule replaces the storage account name to use with the new one: storage-adlsgen2-account-prod.blob.core.windows.net
.
userinfo rule: This rule replaces the filesystem name to use with the new one: filesystem-prod
.
fileLocation rule: This rule performs a text substitution to replace the file path. This rule applies to both input and output object file paths.
Request:
Item | v4 APIs | ||
---|---|---|---|
API Endpoint |
| ||
Method |
|
Request Body:
Code Block |
---|
[
{"type":"host","on":"storage-adlsgen2-account-dev.blob.core.windows.net","with":"storage-adlsgen2-account-prod.blob.core.windows.net"},
{"type":"userinfo","on":"filesystem-dev","with":"filesystem-prod"},
{"type":"fileLocation","on":"/projs/work/orders.csv","with":"/2003/transactions/orders.csv"}
] |
Response:
Item | v4 APIs | ||
---|---|---|---|
Status Code - Success | 200 - OK | ||
Response Body | When the new rules are applied, all previously existing rules for the object in the deployment are deleted. The response body contains any rules that have been deleted as part of this request. In the following example, there were no rules, so nothing was deleted:
| ||
Documentation | See
|
To test your rule, perform a dry run of the import. See below.
Example - Remap an ADLS Gen1 location
For ADLS Gen1 sources, you can apply remapping rules during import.
In this example, your import rule must remap the Azure data lake store and file location:
Dev data store | adl://storage-adlsgen1-account.azuredatalakestore.net |
---|---|
Dev File Location | /projs/work/orders.csv |
Prod data store | adl://storage-adlsgen1-account-prod.azuredatalakestore.net |
Prod File Location | /2003/transactions/orders.csv |
You can use the following value import rules to change the datastore and file paths.
Info |
---|
NOTE: You can specify multiple rules in a single request. Rules are applied in the order that they are listed. Latter rules must factor the results of earlier rules. |
host rule: This rule replaces the datastore name to use with the new one: storage-adlsgen1-account-prod.azuredatalakestore.net
.
fileLocation rule: This rule performs a text substitution to replace the file path. This rule applies to both input and output object file paths.
Request:
Item | v4 APIs | ||
---|---|---|---|
API Endpoint |
| ||
Method |
|
Request Body:
Code Block |
---|
[
{"type":"host","on":"storage-adlsgen1-account-dev.azuredatalakestore.net","with":"storage-adlsgen1-account-prod.azuredatalakestore.net"},
{"type":"fileLocation","on":"/projs/work/orders.csv","with":"/2003/transactions/orders.csv"}
] |
Response:
Item | v4 APIs | ||
---|---|---|---|
Status Code - Success | 200 - OK | ||
Response Body | When the new rules are applied, all previously existing rules for the object in the deployment are deleted. The response body contains any rules that have been deleted as part of this request. In the following example, there were no rules, so nothing was deleted:
| ||
Documentation | See
|
To test your rule, perform a dry run of the import. See below.
Example - Remap a relational datasource
...