Azure
Overview
This code block demonstrates how to query Parquet file(s) stored in Azure. The file path must start with an Azure
scheme such as az
, azure
, or abfss
.
The glob pattern can be used to query a directory of files.
Fully-qualified path syntax is also supported.
Providing Credentials
CREATE USER MAPPING
is used to provide Azure 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.
There are several ways to authenticate with Azure: via a connection string, the Azure credential chain, or an Azure Service Principal.
Connection String
The following code block demonstrates how to use a connection string.
If authentication is not used, a storage account name must be provided.
Credential Chain
The CREDENTIAL CHAIN
provider allows connecting using credentials automatically fetched by the Azure SDK via the Azure credential chain. By default,
the DefaultAzureCredential
chain used, which tries credentials according to the order specified by the
Azure documentation.
The chain
option can be used to specify a specific chain. This takes a semicolon-separated list of providers that will be tried in order.
The available chains are cli
, env
, managed_identity
, and default
.
Service Principal
The service principal provider allows connecting using a Azure Service Principal (SPN).
If a certificate is present on the same Postgres instance, it can also be used.
Configuring a Proxy
The following code block demonstrates how to configure proxy information.
Was this page helpful?