awswrangler.neptune.bulk_load_from_files(client: NeptuneClient, path: str, iam_role: str, format: Literal['csv', 'opencypher', 'ntriples', 'nquads', 'rdfxml', 'turtle'] = 'csv', neptune_load_wait_polling_delay: float = 0.25, load_parallelism: Literal['LOW', 'MEDIUM', 'HIGH', 'OVERSUBSCRIBE'] = 'HIGH', parser_configuration: BulkLoadParserConfiguration | None = None, update_single_cardinality_properties: Literal['TRUE', 'FALSE'] = 'FALSE', queue_request: Literal['TRUE', 'FALSE'] = 'FALSE', dependencies: list[str] | None = None) None

Load files from S3 into Amazon Neptune using the Neptune Bulk Loader.

For more information about the Bulk Loader see here.


This function has arguments which can be configured globally through wr.config or environment variables:

  • neptune_load_wait_polling_delay

Check out the Global Configurations Tutorial for details.

  • client (NeptuneClient) – Instance of the neptune client to use

  • path (str) – S3 Path that the Neptune Bulk Loader will load data from.

  • iam_role (str) – The Amazon Resource Name (ARN) for an IAM role to be assumed by the Neptune DB instance for access to the S3 bucket. For information about creating a role that has access to Amazon S3 and then associating it with a Neptune cluster, see Prerequisites: IAM Role and Amazon S3 Access.

  • format (str) – The format of the data.

  • neptune_load_wait_polling_delay (float) – Interval in seconds for how often the function will check if the Neptune bulk load has completed.

  • load_parallelism (str) – Specifies the number of threads used by Neptune’s bulk load process.

  • parser_configuration (dict[str, Any], optional) – An optional object with additional parser configuration values. Each of the child parameters is also optional: namedGraphUri, baseUri and allowEmptyStrings.

  • update_single_cardinality_properties (str) – An optional parameter that controls how the bulk loader treats a new value for single-cardinality vertex or edge properties.

  • queue_request (str) –

    An optional flag parameter that indicates whether the load request can be queued up or not.

    If omitted or set to "FALSE", the load request will fail if another load job is already running.

  • dependencies (list[str], optional) – An optional parameter that can make a queued load request contingent on the successful completion of one or more previous jobs in the queue.


>>> import awswrangler as wr
>>> client = wr.neptune.connect("MY_NEPTUNE_ENDPOINT", 8182)
>>> wr.neptune.bulk_load_from_files(
...     client=client,
...     path="s3://my-bucket/stage-files/",
...     iam_role="arn:aws:iam::XXX:role/XXX",
...     format="csv",
... )