Hugging Face
Overview
This code block demonstrates how to query machine learning datasets from the Hugging Face Datasets library. The file path must start with hf://
.
Providing Credentials
CREATE USER MAPPING
is used to provide Hugging Face credentials. These credentials are tied to a specific Postgres user, which enables
multiple users to query the same foreign table with their own credentials.
The name of the Postgres user. If set to public
, these credentials will be
applied to all users. SELECT current_user
can be used to get the name of the
current Postgres user.
Foreign server name.
Credentials Options
The following options can be passed into CREATE USER MAPPING
:
Credential Chain Provider
The CREDENTIAL_CHAIN
provider allows connecting using credentials automatically fetched from ~/.cache/huggingface/token
.
Was this page helpful?