View a markdown version of this page

Neptune 로더 Get-Status 예제 - Amazon Neptune

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Neptune 로더 Get-Status 예제

다음 예제에서는 Amazon Neptune 그래프 데이터베이스로의 데이터 로드 상태에 대한 정보를 검색할 수 있는 Amazon Neptune 로더의 GET-Status API 사용을 보여줍니다. 이 예제에서는 특정 로드의 상태 검색, 사용 가능한 로드 ID 나열, 특정 로드에 대한 세부 상태 정보 요청이라는 세 가지 주요 시나리오를 다룹니다.

로드 상태 요청 예제

다음은 curl 명령을 사용하여 HTTP GET을 통해 전송된 요청입니다.

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

자세한 내용은 AWS CLI 명령 참조의 get-loader-job-status를 참조하세요.

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
참고

이 예제에서는 자격 AWS 증명이 환경에 구성되어 있다고 가정합니다. us-east-1을 Neptune 클러스터의 리전으로 바꿉니다.

curl
curl -X GET 'https://your-neptune-endpoint:port/loader/loadId (a UUID)'
예응답
{ "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 } } }

loadIds 요청 예제

다음은 curl 명령을 사용하여 HTTP GET을 통해 전송된 요청입니다.

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

자세한 내용은 AWS CLI 명령 참조의 list-loader-jobs를 참조하세요.

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
참고

이 예제에서는 자격 AWS 증명이 환경에 구성되어 있다고 가정합니다. us-east-1을 Neptune 클러스터의 리전으로 바꿉니다.

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

세부 상태 요청 예제

다음은 curl 명령을 사용하여 HTTP GET을 통해 전송된 요청입니다.

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

자세한 내용은 AWS CLI 명령 참조의 get-loader-job-status를 참조하세요.

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
참고

이 예제에서는 자격 AWS 증명이 환경에 구성되어 있다고 가정합니다. us-east-1을 Neptune 클러스터의 리전으로 바꿉니다.

curl
curl -X GET 'https://your-neptune-endpoint:port/loader/loadId (a UUID)?details=true'
예응답
{ "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 } } }