createDataloadingJob
Create a dataloading job
/v1/graph/{graph_id}/dataloading
Usage and SDK Samples
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://virtserver.swaggerhub.com/GRAPHSCOPE/InteractiveAPI/1.0.0/v1/graph/{graph_id}/dataloading" \
-d '{
"loading_config" : {
"x_csr_params" : {
"parallelism" : 7,
"build_csr_in_mem" : true,
"use_mmap_vector" : true
},
"format" : {
"metadata" : {
"key" : ""
},
"type" : "type"
},
"import_option" : "init",
"data_source" : {
"scheme" : "odps",
"location" : "location"
}
},
"edge_mappings" : [ {
"inputs" : [ "inputs", "inputs" ],
"source_vertex_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
} ],
"destination_vertex_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
} ],
"column_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
} ],
"type_triplet" : {
"edge" : "edge",
"source_vertex" : "source_vertex",
"destination_vertex" : "destination_vertex"
}
}, {
"inputs" : [ "inputs", "inputs" ],
"source_vertex_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
} ],
"destination_vertex_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "id"
} ],
"column_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
} ],
"type_triplet" : {
"edge" : "edge",
"source_vertex" : "source_vertex",
"destination_vertex" : "destination_vertex"
}
} ],
"vertex_mappings" : [ {
"type_name" : "type_name",
"inputs" : [ "file:///path/to/person.csv", "file:///path/to/person.csv" ],
"column_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
} ]
}, {
"type_name" : "type_name",
"inputs" : [ "file:///path/to/person.csv", "file:///path/to/person.csv" ],
"column_mappings" : [ {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
}, {
"column" : {
"name" : "name",
"index" : 9
},
"property" : "property"
} ]
} ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminServiceGraphManagementApi;
import java.io.File;
import java.util.*;
public class AdminServiceGraphManagementApiExample {
public static void main(String[] args) {
// Create an instance of the API class
AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi();
String graphId = graphId_example; // String | The id of graph to do bulk loading.
SchemaMapping schemaMapping = ; // SchemaMapping |
try {
JobResponse result = apiInstance.createDataloadingJob(graphId, schemaMapping);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminServiceGraphManagementApi#createDataloadingJob");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String graphId = new String(); // String | The id of graph to do bulk loading.
final SchemaMapping schemaMapping = new SchemaMapping(); // SchemaMapping |
try {
final result = await api_instance.createDataloadingJob(graphId, schemaMapping);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createDataloadingJob: $e\n');
}
import org.openapitools.client.api.AdminServiceGraphManagementApi;
public class AdminServiceGraphManagementApiExample {
public static void main(String[] args) {
AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi();
String graphId = graphId_example; // String | The id of graph to do bulk loading.
SchemaMapping schemaMapping = ; // SchemaMapping |
try {
JobResponse result = apiInstance.createDataloadingJob(graphId, schemaMapping);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminServiceGraphManagementApi#createDataloadingJob");
e.printStackTrace();
}
}
}
// Create an instance of the API class
AdminServiceGraphManagementApi *apiInstance = [[AdminServiceGraphManagementApi alloc] init];
String *graphId = graphId_example; // The id of graph to do bulk loading. (default to null)
SchemaMapping *schemaMapping = ; //
[apiInstance createDataloadingJobWith:graphId
schemaMapping:schemaMapping
completionHandler: ^(JobResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var GraphScopeInteractiveApiV03 = require('graph_scope_interactive_api_v0_3');
// Create an instance of the API class
var api = new GraphScopeInteractiveApiV03.AdminServiceGraphManagementApi()
var graphId = graphId_example; // {String} The id of graph to do bulk loading.
var schemaMapping = ; // {SchemaMapping}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createDataloadingJob(graphId, schemaMapping, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createDataloadingJobExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new AdminServiceGraphManagementApi();
var graphId = graphId_example; // String | The id of graph to do bulk loading. (default to null)
var schemaMapping = new SchemaMapping(); // SchemaMapping |
try {
JobResponse result = apiInstance.createDataloadingJob(graphId, schemaMapping);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AdminServiceGraphManagementApi.createDataloadingJob: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminServiceGraphManagementApi();
$graphId = graphId_example; // String | The id of graph to do bulk loading.
$schemaMapping = ; // SchemaMapping |
try {
$result = $api_instance->createDataloadingJob($graphId, $schemaMapping);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminServiceGraphManagementApi->createDataloadingJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminServiceGraphManagementApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminServiceGraphManagementApi->new();
my $graphId = graphId_example; # String | The id of graph to do bulk loading.
my $schemaMapping = WWW::OPenAPIClient::Object::SchemaMapping->new(); # SchemaMapping |
eval {
my $result = $api_instance->createDataloadingJob(graphId => $graphId, schemaMapping => $schemaMapping);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AdminServiceGraphManagementApi->createDataloadingJob: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.AdminServiceGraphManagementApi()
graphId = graphId_example # String | The id of graph to do bulk loading. (default to null)
schemaMapping = # SchemaMapping |
try:
api_response = api_instance.create_dataloading_job(graphId, schemaMapping)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminServiceGraphManagementApi->createDataloadingJob: %s\n" % e)
extern crate AdminServiceGraphManagementApi;
pub fn main() {
let graphId = graphId_example; // String
let schemaMapping = ; // SchemaMapping
let mut context = AdminServiceGraphManagementApi::Context::default();
let result = client.createDataloadingJob(graphId, schemaMapping, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
graph_id* |
String
The id of graph to do bulk loading.
Required
|
Name | Description |
---|---|
schemaMapping * |