Entity.ImportBusinessMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ImportBusinessMetadata(RequestContent, RequestContext) |
[Protocol Method] Upload the file for creating Business Metadata in BULK
|
ImportBusinessMetadata(BinaryData, CancellationToken) |
Upload the file for creating Business Metadata in BULK. |
ImportBusinessMetadata(BusinessMetadataOptions, CancellationToken) |
Upload the file for creating Business Metadata in BULK. |
ImportBusinessMetadata(RequestContent, RequestContext)
- Source:
- Entity.cs
[Protocol Method] Upload the file for creating Business Metadata in BULK
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler ImportBusinessMetadata(BusinessMetadataOptions, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response ImportBusinessMetadata (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member ImportBusinessMetadata : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.ImportBusinessMetadata : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function ImportBusinessMetadata (content As RequestContent, Optional context As RequestContext = Nothing) As Response
Parameters
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content
is null.
Service returned a non-success status code.
Examples
This sample shows how to call ImportBusinessMetadata and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();
using RequestContent content = RequestContent.Create(new
{
file = new object(),
});
Response response = client.ImportBusinessMetadata(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call ImportBusinessMetadata with all request content and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();
using RequestContent content = RequestContent.Create(new
{
file = new object(),
});
Response response = client.ImportBusinessMetadata(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString());
Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString());
Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString());
Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString());
Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString());
Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString());
Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString());
Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString());
Applies to
ImportBusinessMetadata(BinaryData, CancellationToken)
- Source:
- Entity.cs
Upload the file for creating Business Metadata in BULK.
public virtual Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult> ImportBusinessMetadata (BinaryData file, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportBusinessMetadata : BinaryData * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult>
override this.ImportBusinessMetadata : BinaryData * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult>
Public Overridable Function ImportBusinessMetadata (file As BinaryData, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BulkImportResult)
Parameters
- file
- BinaryData
InputStream of file.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
file
is null.
Applies to
ImportBusinessMetadata(BusinessMetadataOptions, CancellationToken)
- Source:
- Entity.cs
Upload the file for creating Business Metadata in BULK.
public virtual Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult> ImportBusinessMetadata (Azure.Analytics.Purview.DataMap.BusinessMetadataOptions businessMetadataOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportBusinessMetadata : Azure.Analytics.Purview.DataMap.BusinessMetadataOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult>
override this.ImportBusinessMetadata : Azure.Analytics.Purview.DataMap.BusinessMetadataOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.BulkImportResult>
Public Overridable Function ImportBusinessMetadata (businessMetadataOptions As BusinessMetadataOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BulkImportResult)
Parameters
- businessMetadataOptions
- BusinessMetadataOptions
Business metadata to send to the service.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
businessMetadataOptions
is null.
Examples
This sample shows how to call ImportBusinessMetadata.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();
BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(BinaryData.FromObjectAsJson(new object()));
Response<BulkImportResult> response = client.ImportBusinessMetadata(businessMetadataOptions);
This sample shows how to call ImportBusinessMetadata with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();
BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(BinaryData.FromObjectAsJson(new object()));
Response<BulkImportResult> response = client.ImportBusinessMetadata(businessMetadataOptions);
Applies to
Azure SDK for .NET