create_graph_using_import_task
async
¶
create_graph_using_import_task(
graph_name: GraphName,
source: str,
role_arn: RoleArn,
*,
config_overrides: Optional[AsyncNeptuneGraphClientConfig] = None,
tags: Optional[TagMap] = None,
public_connectivity: Optional[bool] = None,
kms_key_identifier: Optional[KmsKeyArn] = None,
vector_search_configuration: Optional[VectorSearchConfiguration] = None,
replica_count: Optional[ReplicaCount] = None,
deletion_protection: Optional[bool] = None,
import_options: Optional[ImportOptions] = None,
max_provisioned_memory: Optional[ProvisionedMemory] = None,
min_provisioned_memory: Optional[ProvisionedMemory] = None,
fail_on_error: Optional[bool] = None,
format: Optional[Format] = None,
parquet_type: Optional[ParquetType] = None,
blank_node_handling: Optional[BlankNodeHandling] = None,
) -> CreateGraphUsingImportTaskOutput
Creates a new Neptune Analytics graph and imports data into it, either from Amazon Simple Storage Service (S3) or from a Neptune database or a Neptune database snapshot.
The data can be loaded from files in S3 that in either the Gremlin CSV format or the openCypher load format.
Parameters:
-
graph_name(GraphName) –A name for the new Neptune Analytics graph to be created.
The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.
-
tags(Optional[TagMap], default:None) –Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.
-
public_connectivity(Optional[bool], default:None) –Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (
trueto enable, orfalseto disable). -
kms_key_identifier(Optional[KmsKeyArn], default:None) –Specifies a KMS key to use to encrypt data imported into the new graph.
-
vector_search_configuration(Optional[VectorSearchConfiguration], default:None) –Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as
dimension=value. Max = 65,535 -
replica_count(Optional[ReplicaCount], default:None) –The number of replicas in other AZs to provision on the new graph after import. Default = 1, Min = 0, Max = 2.
Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.
-
deletion_protection(Optional[bool], default:None) –Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (
trueorfalse). -
import_options(Optional[ImportOptions], default:None) –Contains options for controlling the import process. For example, if the
failOnErrorkey is set tofalse, the import skips problem data and attempts to continue (whereas if set totrue, the default, or if omitted, the import operation halts immediately when an error is encountered. -
max_provisioned_memory(Optional[ProvisionedMemory], default:None) –The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, or the approved upper limit for your account.
If both the minimum and maximum values are specified, the final
provisioned-memorywill be chosen per the actual size of your imported data. If neither value is specified, 128 m-NCUs are used. -
min_provisioned_memory(Optional[ProvisionedMemory], default:None) –The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 16
-
fail_on_error(Optional[bool], default:None) –If set to
true, the task halts when an import error is encountered. If set tofalse, the task skips the data that caused the error and continues if possible. -
source(str) –A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.
-
format(Optional[Format], default:None) –Specifies the format of S3 data to be imported. Valid values are
CSV, which identifies the Gremlin CSV format,OPEN_CYPHER, which identifies the openCypher load format, orntriples, which identifies the RDF n-triples format. -
parquet_type(Optional[ParquetType], default:None) –The parquet type of the import task.
-
blank_node_handling(Optional[BlankNodeHandling], default:None) –The method to handle blank nodes in the dataset. Currently, only
convertToIriis supported, meaning blank nodes are converted to unique IRIs at load time. Must be provided when format isntriples. For more information, see Handling RDF values. -
role_arn(RoleArn) –The ARN of the IAM role that will allow access to the data that is to be imported.
Raises:
-
ConflictException–Raised when a conflict is encountered.
-
InternalServerException–A failure occurred on the server.
-
ServiceQuotaExceededException–A service quota was exceeded.
-
ThrottlingException–The exception was interrupted by throttling.
-
ValidationException–A resource could not be validated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_neptune_graph/_services/async_neptune_graph.py
1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 | |