View a markdown version of this page

Esempi di Neptune Loader Get-Status - Amazon Neptune

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Esempi di Neptune Loader Get-Status

Gli esempi seguenti mostrano l'utilizzo dell' GET-Status API del loader Neptune, che consente di recuperare informazioni sullo stato dei carichi di dati nel database grafico di Amazon Neptune. Questi esempi coprono tre scenari principali: recupero dello stato di un carico specifico, elenco degli ID di carico disponibili e richiesta di informazioni dettagliate sullo stato per un carico specifico.

Esempio di richiesta dello stato di caricamento

Di seguito viene riportata una richiesta inviata tramite HTTP GET mediante il comando curl.

AWS CLI
aws neptunedata get-loader-job-status \ --endpoint-url https://your-neptune-endpoint:port \ --load-id loadId (a UUID)

Per ulteriori informazioni, vedere https://docs.aws.amazon.com/cli/latest/reference/neptunedata/get-loader-job-status.html get-loader-job-status nel Command Reference. AWS CLI

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.get_loader_job_status( loadId='loadId (a UUID)' ) print(response)
awscurl
awscurl 'https://your-neptune-endpoint:port/loader/loadId (a UUID)' \ --region us-east-1 \ --service neptune-db
Nota

Questo esempio presuppone che le credenziali siano configurate nel tuo ambiente. AWS Sostituisci us-east-1 con la regione del tuo cluster Neptune.

curl
curl -X GET 'https://your-neptune-endpoint:port/loader/loadId (a UUID)'
Esempio Risposta
{ "status" : "200 OK", "payload" : { "feedCount" : [ { "LOAD_FAILED" : 1 } ], "overallStatus" : { "datatypeMismatchErrors" : 0, "fullUri" : "s3://bucket/key", "insertErrors" : 0, "parsingErrors" : 5, "retryNumber" : 0, "runNumber" : 1, "status" : "LOAD_FAILED", "totalDuplicates" : 0, "totalRecords" : 5, "totalTimeSpent" : 3.0 } } }

Esempio di richiesta di loadIds

Di seguito viene riportata una richiesta inviata tramite HTTP GET mediante il comando curl.

AWS CLI
aws neptunedata list-loader-jobs \ --endpoint-url https://your-neptune-endpoint:port \ --limit 3

Per ulteriori informazioni, vedi https://docs.aws.amazon.com/cli/latest/reference/neptunedata/list-loader-jobs.html list-loader-jobs nel Command Reference. AWS CLI

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.list_loader_jobs( limit=3 ) print(response)
awscurl
awscurl 'https://your-neptune-endpoint:port/loader?limit=3' \ --region us-east-1 \ --service neptune-db
Nota

Questo esempio presuppone che le tue AWS credenziali siano configurate nel tuo ambiente. Sostituisci us-east-1 con la regione del tuo cluster Neptune.

curl
curl -X GET 'https://your-neptune-endpoint:port/loader?limit=3'
Esempio Risposta
{ "status" : "200 OK", "payload" : { "loadIds" : [ "a2c0ce44-a44b-4517-8cd4-1dc144a8e5b5", "09683a01-6f37-4774-bb1b-5620d87f1931", "58085eb8-ceb4-4029-a3dc-3840969826b9" ] } }

Esempio di richiesta dello stato dettagliato

Di seguito viene riportata una richiesta inviata tramite HTTP GET mediante il comando curl.

AWS CLI
aws neptunedata get-loader-job-status \ --endpoint-url https://your-neptune-endpoint:port \ --load-id loadId (a UUID) \ --details

Per ulteriori informazioni, vedi get-loader-job-status nel Command Reference. AWS CLI

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.get_loader_job_status( loadId='loadId (a UUID)', details=True ) print(response)
awscurl
awscurl 'https://your-neptune-endpoint:port/loader/loadId (a UUID)?details=true' \ --region us-east-1 \ --service neptune-db
Nota

Questo esempio presuppone che le credenziali siano configurate nel tuo ambiente. AWS Sostituisci us-east-1 con la regione del tuo cluster Neptune.

curl
curl -X GET 'https://your-neptune-endpoint:port/loader/loadId (a UUID)?details=true'
Esempio Risposta
{ "status" : "200 OK", "payload" : { "failedFeeds" : [ { "datatypeMismatchErrors" : 0, "fullUri" : "s3://bucket/key", "insertErrors" : 0, "parsingErrors" : 5, "retryNumber" : 0, "runNumber" : 1, "status" : "LOAD_FAILED", "totalDuplicates" : 0, "totalRecords" : 5, "totalTimeSpent" : 3.0 } ], "feedCount" : [ { "LOAD_FAILED" : 1 } ], "overallStatus" : { "datatypeMismatchErrors" : 0, "fullUri" : "s3://bucket/key", "insertErrors" : 0, "parsingErrors" : 5, "retryNumber" : 0, "runNumber" : 1, "status" : "LOAD_FAILED", "totalDuplicates" : 0, "totalRecords" : 5, "totalTimeSpent" : 3.0 } } }