Partilhar via


Lineage.GetByUniqueAttribute Method

Definition

Overloads

GetByUniqueAttribute(String, LineageDirection, Nullable<Int32>, String, CancellationToken)

Return lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

The REST request would look something like this:

GET /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

GetByUniqueAttribute(String, String, Nullable<Int32>, String, RequestContext)

[Protocol Method] Return lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

The REST request would look something like this:

GET /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

GetByUniqueAttribute(String, LineageDirection, Nullable<Int32>, String, CancellationToken)

Source:
Lineage.cs

Return lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

The REST request would look something like this:

GET /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

public virtual Azure.Response<Azure.Analytics.Purview.DataMap.AtlasLineageInfo> GetByUniqueAttribute (string typeName, Azure.Analytics.Purview.DataMap.LineageDirection direction, int? depth = default, string attribute = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetByUniqueAttribute : string * Azure.Analytics.Purview.DataMap.LineageDirection * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasLineageInfo>
override this.GetByUniqueAttribute : string * Azure.Analytics.Purview.DataMap.LineageDirection * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasLineageInfo>
Public Overridable Function GetByUniqueAttribute (typeName As String, direction As LineageDirection, Optional depth As Nullable(Of Integer) = Nothing, Optional attribute As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AtlasLineageInfo)

Parameters

typeName
String

The name of the type.

direction
LineageDirection

The direction of the lineage, which could be INPUT, OUTPUT or BOTH.

depth
Nullable<Int32>

The number of hops for lineage.

attribute
String

The qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes)

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

typeName is null.

typeName is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetByUniqueAttribute.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Lineage client = new DataMapClient(endpoint, credential).GetLineageClient();

Response<AtlasLineageInfo> response = client.GetByUniqueAttribute("<typeName>", LineageDirection.Input);

This sample shows how to call GetByUniqueAttribute with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Lineage client = new DataMapClient(endpoint, credential).GetLineageClient();

Response<AtlasLineageInfo> response = client.GetByUniqueAttribute("<typeName>", LineageDirection.Input, depth: 1234, attribute: "<attribute>");

Applies to

GetByUniqueAttribute(String, String, Nullable<Int32>, String, RequestContext)

Source:
Lineage.cs

[Protocol Method] Return lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

The REST request would look something like this:

GET /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

public virtual Azure.Response GetByUniqueAttribute (string typeName, string direction, int? depth = default, string attribute = default, Azure.RequestContext context = default);
abstract member GetByUniqueAttribute : string * string * Nullable<int> * string * Azure.RequestContext -> Azure.Response
override this.GetByUniqueAttribute : string * string * Nullable<int> * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetByUniqueAttribute (typeName As String, direction As String, Optional depth As Nullable(Of Integer) = Nothing, Optional attribute As String = Nothing, Optional context As RequestContext = Nothing) As Response

Parameters

typeName
String

The name of the type.

direction
String

The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH".

depth
Nullable<Int32>

The number of hops for lineage.

attribute
String

The qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes)

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

typeName or direction is null.

typeName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetByUniqueAttribute and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Lineage client = new DataMapClient(endpoint, credential).GetLineageClient();

Response response = client.GetByUniqueAttribute("<typeName>", "INPUT");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetByUniqueAttribute with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Lineage client = new DataMapClient(endpoint, credential).GetLineageClient();

Response response = client.GetByUniqueAttribute("<typeName>", "INPUT", depth: 1234, attribute: "<attribute>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("baseEntityGuid").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classificationNames")[0].ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("entityGuid").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("isIncomplete").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("labels")[0].ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meaningNames")[0].ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("confidence").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("meanings")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("<key>").GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("widthCounts").GetProperty("<key>").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("lineageDepth").ToString());
Console.WriteLine(result.GetProperty("lineageWidth").ToString());
Console.WriteLine(result.GetProperty("childrenCount").ToString());
Console.WriteLine(result.GetProperty("lineageDirection").ToString());
Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString());
Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString());
Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString());
Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString());
Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString());
Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString());

Applies to