Cancel an entity reconciliation job
Stay organized with collections
Save and categorize content based on your preferences.
Cancels a running entity reconciliation job.
Explore further
For detailed documentation that includes this code sample, see the following:
Code sample
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["\u003cp\u003eThis content details how to cancel a running entity reconciliation job using the Enterprise Knowledge Graph API.\u003c/p\u003e\n"],["\u003cp\u003eThe provided Python code sample demonstrates how to use the \u003ccode\u003ecancel_entity_reconciliation_job\u003c/code\u003e function with a client.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication to Enterprise Knowledge Graph requires setting up Application Default Credentials, as shown in the linked document.\u003c/p\u003e\n"],["\u003cp\u003eFurther documentation on managing entity reconciliation jobs and the Enterprise Knowledge Graph Python API is available via the provided links.\u003c/p\u003e\n"],["\u003cp\u003eYou will need to define your project ID, the location and the job id in order for the function to work.\u003c/p\u003e\n"]]],[],null,["# Cancel an entity reconciliation job\n\nCancels a running entity reconciliation job.\n\nExplore further\n---------------\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [Manage entity reconciliation jobs with the API](/enterprise-knowledge-graph/docs/entity-reconciliation-api)\n\nCode sample\n-----------\n\n### Python\n\n\nFor more information, see the\n[Enterprise Knowledge Graph Python API\nreference documentation](/python/docs/reference/enterpriseknowledgegraph/latest).\n\n\nTo authenticate to Enterprise Knowledge Graph, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\n from google.cloud import enterpriseknowledgegraph as ekg\n\n # TODO(developer): Uncomment these variables before running the sample.\n # project_id = 'YOUR_PROJECT_ID'\n # location = 'YOUR_GRAPH_LOCATION' # Values: 'global'\n # job_id = 'YOUR_JOB_ID' # Entity Reconciliation Job ID\n\n\n def cancel_entity_reconciliation_job_sample(\n project_id: str, location: str, job_id: str\n ) -\u003e None:\n # Create a client\n client = ekg.EnterpriseKnowledgeGraphServiceClient()\n\n # The full resource name of the job\n # e.g. projects/{project_id}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}\n name = client.entity_reconciliation_job_path(\n project=project_id, location=location, entity_reconciliation_job=job_id\n )\n\n # Initialize request argument(s)\n request = ekg.CancelEntityReconciliationJobRequest(name=name)\n\n # Make the request\n client.cancel_entity_reconciliation_job(request=request)\n\n print(f\"Job: {name} successfully cancelled\")\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=enterpriseknowledgegraph)."]]