Create a data loading job from file
(graph_identifier, filename)
| 238 | help="Path of yaml file", |
| 239 | ) |
| 240 | def 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() |
nothing calls this directly
no test coverage detected