fetch#
- databricks_external_access.fetch(name: str, *, columns: Sequence[str] | None = None, where: str | None = None, limit: int | None = None, dest: Path | str = 'data') Path[source]#
Write a table, or a slice of it, to a local Parquet file.
Prints the table’s size on storage to stderr before reading any data. The file is
<dest>/<name>.parquet, written through a temporary file so a failure leaves nothing behind.- Parameters:
- namestr
Full table name,
catalog.schema.table.- columnsSequence[str] | None
Columns to keep. Default: all of the table’s declared columns.
- wherestr | None
DuckDB SQL predicate selecting rows, for example
ticker = 'NVDA'. It runs on your machine with your own credentials, so it is not sanitised.- limitint | None
Maximum number of rows. Default: no limit.
- destPath | str
Directory to write into, created if missing. Default:
data.
- Returns:
- Path
The path of the Parquet file written.
- Raises:
- UnsupportedTable
The table cannot be read from outside Databricks.
- AccessDenied
You lack
SELECTon the table orEXTERNAL USE SCHEMAon its schema.- NotFound
The table does not exist, or you cannot see it.
- NotSignedIn
Databricks rejected your sign-in.
- Error
No workspace is configured.