Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #403 from multinet-app/fix-numeric-key
Browse files Browse the repository at this point in the history
Cast _key field to str on graph/table upload
  • Loading branch information
jjnesbitt committed Jun 26, 2020
2 parents 4f03d4b + e83162a commit 4ed69de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions multinet/uploaders/d3_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def upload(workspace: str, graph: str) -> Any:
# Change column names from the d3 format to the arango format
nodes = data["nodes"]
for node in nodes:
node["_key"] = node["id"]
node["_key"] = str(node["id"])
del node["id"]

links = data["links"]
Expand All @@ -116,7 +116,7 @@ def upload(workspace: str, graph: str) -> Any:
links_coll = space.create_collection(edge_table_name, edge=True)

# Insert data
nodes_coll.insert_many(nodes)
nodes_coll.insert_many(nodes, sync=True)
links_coll.insert_many(links, sync=True)

properties = util.get_edge_table_properties(workspace, edge_table_name)
Expand Down

0 comments on commit 4ed69de

Please sign in to comment.