Skip to main content
Table functions read documents, text, images, video, audio, and more as SQL tables. Use them in FROM like any other table. Each table function accepts a file, directory, glob, or remote URI. See Sources for URI forms and authentication.

Automatic reader selection

You can put a single-quoted file path or glob directly in FROM. Chowder selects the same reader from the extension and uses its default settings:
This is equivalent to:
Every format in the table above supports this syntax, with local paths and remote URIs. Reader selection uses the extension in the path or glob, such as *.jpg; it does not inspect the contents to guess a format. JSON files must be line-delimited, including files named .json. Use an explicit reader when:
  • The path has no recognized extension, such as a directory or data/*.
  • You want one reader to select its supported files from a directory containing multiple formats.
  • You need reader parameters, such as read_videos('clips/*.mp4', 10) for 10-second windows. The path shortcut uses the default 5-second audio and video windows.
A bare directory doesn’t provide enough information to choose a reader. See Folders and globs for the CSV, JSON, and Parquet matching rules.

Reuse a relation when source files change

For local and object-store sources, the first time you materialize a relation using read_csv, read_json, or read_parquet, it uses the file list and metadata Chowder collected when you called sql(). The relation keeps the column names, types, and file or directory selector that Chowder determined when you created it. Each subsequent materialization refreshes the file list and metadata. For Hugging Face sources, including buckets, Chowder resolves the file selection when you call sql(). Call sql() again to discover newly matching files. Call sql() again to pick up a schema change or a source path that changed from a file to a directory or vice versa. Also call sql() again if the reader found no eligible, nonempty files when you created the relation. This can happen with an empty directory, an unmatched glob, or a zero-byte file.