FlatFileIntegration Objects
class FlatFileIntegration(GraiIntegrationImplementation)
A class for extracting Grai compliant metadata from flat files like csv and parquet.
Attributes:
file_name
- A path to the filenamespace
- The Grai namespace to associate with output from the integration
__init__
def __init__(file_name: str,
namespace: str,
source: SourceV1,
version: Optional[str] = None)
Initializes the Flat File integration.
Arguments:
file_name
- A path to the filenamespace
- The Grai namespace to associate with output from the integrationsource
- 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 integration
get_nodes_and_edges
@cache
def get_nodes_and_edges() -> Tuple[List[SourcedNode], List[SourcedEdge]]
Returns a tuple of lists of SourcedNode and SourcedEdge objects
nodes
def nodes() -> List[SourcedNode]
Returns a list of SourcedNode objects
edges
def edges() -> List[SourcedEdge]
Returns a list of SourcedEdge objects
ready
def ready() -> bool
Returns True if the integration is ready to run