Partilhar via


Entity.ImportBusinessMetadata Method

Definition

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

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