Exemple #1
0
def ingest_job_list(job_id, feature_set_ref, store_name):
    """
    List ingestion jobs
    """
    # parse feature set reference
    if feature_set_ref is not None:
        feature_set_ref = FeatureSetRef.from_str(feature_set_ref)

    # pull & render ingestion jobs as a table
    feast_client = JCClient()
    table = []
    for ingest_job in feast_client.list_ingest_jobs(
        job_id=job_id, feature_set_ref=feature_set_ref, store_name=store_name
    ):
        table.append([ingest_job.id, IngestionJobStatus.Name(ingest_job.status)])

    from tabulate import tabulate

    print(tabulate(table, headers=["ID", "STATUS"], tablefmt="plain"))
Exemple #2
0
 def test_str_ref(self):
     original_ref = FeatureSetRef(project="test", name="test")
     ref_str = repr(original_ref)
     parsed_ref = FeatureSetRef.from_str(ref_str)
     assert original_ref == parsed_ref