polars.Catalog.scan_table#
- Catalog.scan_table(
- catalog_name: str,
- namespace: str,
- table_name: str,
- *,
- delta_table_version: int | str | datetime | None = None,
- delta_table_options: dict[str, Any] | None = None,
- storage_options: dict[str, Any] | None = None,
- credential_provider: CredentialProviderFunction | Literal['auto'] | None = 'auto',
- retries: int = 2,
Retrieve the metadata of the specified table.
Warning
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
- Parameters:
- catalog_name
Name of the catalog.
- namespace
Name of the namespace (unity schema).
- table_name
Name of the table.
- delta_table_version
Version of the table to scan (Deltalake only).
- delta_table_options
Additional keyword arguments while reading a Deltalake table.
- storage_options
Options that indicate how to connect to a cloud provider.
The cloud providers currently supported are AWS, GCP, and Azure. See supported keys here:
Hugging Face (
hf://
): Accepts an API key under thetoken
parameter:{'token': '...'}
, or by setting theHF_TOKEN
environment variable.
If
storage_options
is not provided, Polars will try to infer the information from environment variables.- credential_provider
Provide a function that can be called to provide cloud storage credentials. The function is expected to return a dictionary of credential keys along with an optional credential expiry time.
Warning
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
- retries
Number of retries if accessing a cloud instance fails.