Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 5.data_packaging/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]
]

PACKAGING_FILES = ["5.data_packaging/location_and_ch5_frame_image_data.parquet"]
PACKAGING_DATASETS = ["5.data_packaging/location_and_ch5_frame_image_data"]
Comment thread
d33bs marked this conversation as resolved.

# FTP resources for accessing IDR
# See here for more:
Expand Down
8 changes: 4 additions & 4 deletions 5.data_packaging/create_lancedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import lancedb
import pandas as pd
import pyarrow as pa
from constants import DATA_FILES_W_COLNAMES, PACKAGING_FILES
from constants import DATA_FILES_W_COLNAMES, PACKAGING_DATASETS
from pyarrow import parquet

# specify a dir where the lancedb database may go and create lancedb client
Expand Down Expand Up @@ -59,10 +59,10 @@ def get_arrow_tbl_from_csv(filename_read: str) -> str:
mode="overwrite",
)

for filename in PACKAGING_FILES:
table = parquet.read_table(source=filename)
for dir in PACKAGING_DATASETS:
table = parquet.ParquetDataset(path_or_paths=dir).read()
ldb.create_table(
name=f"{filename.replace('/','.')}",
name=f"{dir.replace('/','.')}",
Comment thread
d33bs marked this conversation as resolved.
data=table,
schema=table.schema,
mode="overwrite",
Expand Down
Loading