def get_sub_graph(gc): # Export and Get to/from an in memory set entity_seeds = gc.execute_operations([ g.GetAdjacentIds(input=[g.EntitySeed('South West')], include_incoming_out_going=g.InOutType.OUT), g.ExportToSet(), g.GetAdjacentIds(include_incoming_out_going=g.InOutType.OUT), g.ExportToSet(), g.DiscardOutput(), g.GetSetExport() ]) print('Export and Get to/from an in memory set') print(entity_seeds) print()
def get_job_details(gc): # Get all job details job_details_initial = gc.execute_operations([ g.GetAdjacentIds(input=[g.EntitySeed('1')], ), g.ExportToGafferResultCache(), g.DiscardOutput(), g.GetJobDetails() ]) job_id = job_details_initial['jobId'] job_details = gc.execute_operation(g.GetJobDetails(job_id=job_id), ) print('Get job details') print(job_details) print()
def export_to_gaffer_result_cache(gc): # Export to Gaffer Result Cache and Get from Gaffer Result Cache job_details = gc.execute_operations([ g.GetAdjacentIds(input=[g.EntitySeed('South West')], include_incoming_out_going=g.InOutType.OUT), g.ExportToGafferResultCache(), g.DiscardOutput(), g.GetJobDetails() ]) print('Export to Gaffer Result Cache. Job Details:') print(job_details) print() job_id = job_details['jobId'] entity_seeds = gc.execute_operation( g.GetGafferResultCacheExport(job_id=job_id), ) print('Get Gaffer Result Cache Export.') print(entity_seeds) print()