query_lineage(**kwargs)¶Use this action to inspect your lineage and discover relationships between entities. For more information, see Querying Lineage Entities in the Amazon SageMaker Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.query_lineage(
StartArns=[
'string',
],
Direction='Both'|'Ascendants'|'Descendants',
IncludeEdges=True|False,
Filters={
'Types': [
'string',
],
'LineageTypes': [
'TrialComponent'|'Artifact'|'Context'|'Action',
],
'CreatedBefore': datetime(2015, 1, 1),
'CreatedAfter': datetime(2015, 1, 1),
'ModifiedBefore': datetime(2015, 1, 1),
'ModifiedAfter': datetime(2015, 1, 1),
'Properties': {
'string': 'string'
}
},
MaxDepth=123,
MaxResults=123,
NextToken='string'
)
A list of resource Amazon Resource Name (ARN) that represent the starting point for your lineage query.
True retrieves not only the entities of interest but also the Associations and lineage entities on the path. Set to False to only return lineage entities that match your query.A set of filtering parameters that allow you to specify which entities should be returned.
TrialComponent , Artifact , or Context .Filter the lineage entities connected to the StartArn by type. For example: DataSet , Model , Endpoint , or ModelDeployment .
Filter the lineage entities connected to the StartArn (s) by the type of the lineage entity.
Filter the lineage entities connected to the StartArn (s) by created date.
Filter the lineage entities connected to the StartArn (s) after the create date.
Filter the lineage entities connected to the StartArn (s) before the last modified date.
Filter the lineage entities connected to the StartArn (s) after the last modified date.
Filter the lineage entities connected to the StartArn (s) by a set if property key value pairs. If multiple pairs are provided, an entity is included in the results if it matches any of the provided pairs.
StartArns that are traversed. Depth is a measure of the number of Associations from the StartArn entity to the matched results.NextToken in a response to to retrieve the next page of results.NextToken in a response to to retrieve the next page of results.dict
Response Syntax
{
'Vertices': [
{
'Arn': 'string',
'Type': 'string',
'LineageType': 'TrialComponent'|'Artifact'|'Context'|'Action'
},
],
'Edges': [
{
'SourceArn': 'string',
'DestinationArn': 'string',
'AssociationType': 'ContributedTo'|'AssociatedWith'|'DerivedFrom'|'Produced'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Vertices (list) --
A list of vertices connected to the start entity(ies) in the lineage graph.
(dict) --
A lineage entity connected to the starting entity(ies).
Arn (string) --
The Amazon Resource Name (ARN) of the lineage entity resource.
Type (string) --
The type of the lineage entity resource. For example: DataSet , Model , Endpoint , etc...
LineageType (string) --
The type of resource of the lineage entity.
Edges (list) --
A list of edges that connect vertices in the response.
(dict) --
A directed edge connecting two lineage entities.
SourceArn (string) --
The Amazon Resource Name (ARN) of the source lineage entity of the directed edge.
DestinationArn (string) --
The Amazon Resource Name (ARN) of the destination lineage entity of the directed edge.
AssociationType (string) --
The type of the Association(Edge) between the source and destination. For example ContributedTo , Produced , or DerivedFrom .
NextToken (string) --
Limits the number of vertices in the response. Use the NextToken in a response to to retrieve the next page of results.
Exceptions
SageMaker.Client.exceptions.ResourceNotFound