Table.add_files
Table.add_files(*, files=None, directory=None, max_parallelization=os.cpu_count() * 5) → list(File)
Parameters:
Returns:
Examples:
dataset = redivis.user("my_username").dataset("my_dataset")
table = dataset.table("my_files")
# If the file index table doesn't already exist, we can create it
# table.create(is_file_index=True)
# upload all contents in a directory
table.add_files(directory="/path/to/directory/")
# upload specific files
table.add_files(files=list(
{"path": "/path/to/file.png"}, # file name will be "file.png"
{"path": "/path/to/other/file.png", "name": "other_file.png"}, # file name will be other_file.png
{"data": "Hello world", "name": "hello_world.txt"} # Data can be string or bytes
)Was this helpful?

