Skip to content

Commit

Permalink
switch back to import_bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Feb 27, 2024
1 parent b8a19b3 commit 7fb9f67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adbpyg_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@ def __insert_adb_docs(

docs = df.to_dict("records")
db = self.__async_db if use_async else self.__db
result = db.collection(col).insert_many(docs, **adb_import_kwargs)
result = db.collection(col).import_bulk(docs, **adb_import_kwargs)
logger.debug(result)

df.drop(df.index, inplace=True)
Expand Down
6 changes: 2 additions & 4 deletions tests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,6 @@ def test_adb_graph_to_pyg_to_arangodb_with_missing_document_and_permissive(


def test_full_cycle_imdb_without_preserve_adb_keys() -> None:
pytest.skip("temporarily skipping")

name = "imdb"
db.delete_graph(name, drop_collections=True, ignore_missing=True)
arango_restore(con, "tests/data/adb/imdb_dump")
Expand Down Expand Up @@ -824,7 +822,7 @@ def test_full_cycle_homogeneous_with_preserve_adb_keys() -> None:
pyg_g["_v_key"].append(f"new-vertex-{num_nodes}")
pyg_g.num_nodes = num_nodes + 1

adbpyg_adapter.pyg_to_arangodb(name, pyg_g, overwrite_mode="update")
adbpyg_adapter.pyg_to_arangodb(name, pyg_g, on_duplicate="update")
assert_pyg_to_adb(name, pyg_g, {}, False)
assert db.collection("Homogeneous_N").get(f"new-vertex-{num_nodes}") is not None

Expand Down Expand Up @@ -895,7 +893,7 @@ def test_full_cycle_imdb_with_preserve_adb_keys() -> None:
pyg_g,
pyg_to_adb_metagraph,
explicit_metagraph=True,
overwrite_mode="update",
on_duplicate="update",
)
assert_pyg_to_adb(name, pyg_g, pyg_to_adb_metagraph, True)

Expand Down

0 comments on commit 7fb9f67

Please sign in to comment.