MCPcopy Create free account
hub / github.com/alibaba/GraphScope / loaderjob

Function loaderjob

python/graphscope/gsctl/commands/interactive/glob.py:240–252  ·  view source on GitHub ↗

Create a data loading job from file

(graph_identifier, filename)

Source from the content-addressed store, hash-verified

238 help="Path of yaml file",
239)
240def loaderjob(graph_identifier, filename): # noqa: F811
241 """Create a data loading job from file"""
242 if not is_valid_file_path(filename):
243 err(f"Invalid file: {filename}")
244 return
245 graph_identifier = get_graph_id_by_name(graph_identifier)
246 try:
247 config = read_yaml_file(filename)
248 jobid = submit_dataloading_job(graph_identifier, config)
249 except Exception as e:
250 err(f"Failed to create a job: {str(e)}")
251 else:
252 succ(f"Create job {jobid} successfully.")
253
254
255@delete.command()

Callers

nothing calls this directly

Calls 6

is_valid_file_pathFunction · 0.90
errFunction · 0.90
get_graph_id_by_nameFunction · 0.90
read_yaml_fileFunction · 0.90
submit_dataloading_jobFunction · 0.90
succFunction · 0.90

Tested by

no test coverage detected