awswrangler.neptune.bulk_load_from_files

awswrangler.neptune.bulk_load_from_files(client: NeptuneClient, path: str, iam_role: str, neptune_load_wait_polling_delay: float = 0.25, load_parallelism: Literal['LOW', 'MEDIUM', 'HIGH', 'OVERSUBSCRIBE'] = 'HIGH') None

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

For more information about the Bulk Loader see here.

Note

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.

Parameters:
  • 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.

  • 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.

Examples

>>> 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"
... )