Skip to content

Commit

Permalink
Fix file name in build/query scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
prrao87 committed Aug 19, 2024
1 parent 0d818ed commit db5d2f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kuzudb/build_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def main(conn: Connection) -> None:
create_edge_tables(conn)
conn.execute(f"COPY Follows FROM '{EDGES_PATH}/follows.parquet';")
conn.execute(f"COPY LivesIn FROM '{EDGES_PATH}/lives_in.parquet';")
conn.execute(f"COPY HasInterest FROM '{EDGES_PATH}/interests.parquet';")
conn.execute(f"COPY HasInterest FROM '{EDGES_PATH}/interested_in.parquet';")
conn.execute(f"COPY CityIn FROM '{EDGES_PATH}/city_in.parquet';")
conn.execute(f"COPY StateIn FROM '{EDGES_PATH}/state_in.parquet';")

Expand Down
6 changes: 3 additions & 3 deletions neo4j/build_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def merge_edges_person(tx: AsyncManagedTransaction, data: list[JsonBlob])
await tx.run(query, data=data)


async def merge_edges_interests(tx: AsyncManagedTransaction, data: list[JsonBlob]) -> None:
async def merge_edges_interested_in(tx: AsyncManagedTransaction, data: list[JsonBlob]) -> None:
query = """
UNWIND $data AS row
MATCH (p:Person {personID: row.from})
Expand Down Expand Up @@ -193,8 +193,8 @@ async def write_nodes(session: AsyncSession) -> None:
async def write_edges(session: AsyncSession) -> None:
await ingest_person_edges_in_batches(session, merge_edges_person)
# Write person-interest edges
interests = pl.read_parquet(f"{EDGES_PATH}/interests.parquet")
await session.execute_write(merge_edges_interests, data=interests.to_dicts())
interests = pl.read_parquet(f"{EDGES_PATH}/interested_in.parquet")
await session.execute_write(merge_edges_interested_in, data=interests.to_dicts())
# Write person-city edges
cities = pl.read_parquet(f"{EDGES_PATH}/lives_in.parquet")
await session.execute_write(merge_edges_lives_in, data=cities.to_dicts())
Expand Down

0 comments on commit db5d2f1

Please sign in to comment.