OpenLineageIntegration Objects
class OpenLineageIntegration(GraiIntegrationImplementation)
A class for extracting Grai compliant metadata from an OpenLineage json string.
Attributes:
lineage_data
- A dictionary parsing of a OpenLineage json filenamespace
- The Grai namespace to associate with output from the integrationnamespaces
- A dictionary of namespace aliases to use when parsing the lineage data
__init__
def __init__(lineage_data: Union[str, dict],
source: SourceV1,
version: Optional[str] = None,
namespace: Optional[str] = "default",
namespaces: Optional[Dict[str, str]] = None)
Initializes the dbt integration.
Arguments:
lineage_data
- Either a string path to a manifest.json file, or a dictionary parsing of a manifest.json filesource
- The Grai data source to associate with output from the integration. More information about source objects is available in thegrai_schemas
library.version
- The Grai data version to associate with output from the integrationnamespace
- The Grai namespace to associate with output from the integrationnamespaces
- A dictionary of namespace aliases to use when parsing the lineage data
lineage
@cached_property
def lineage() -> OpenLineageProcessor
Returns a ManifestProcessor object for the lineage json file
nodes
def nodes() -> List[SourcedNode]
Returns a list of SourcedNode objects
edges
def edges() -> List[SourcedEdge]
Returns a list of SourcedEdge objects
get_nodes_and_edges
def get_nodes_and_edges() -> Tuple[List[SourcedNode], List[SourcedEdge]]
Returns a tuple of lists of SourcedNode and SourcedEdge objects
ready
def ready() -> bool
Returns True if the integration is ready to run