Class AccountIdentity
An account carries FOUR identifiers, not two, and they are genuinely distinct. Measured together on one account:
CURRENT_ORGANIZATION_NAME() TWEPWDT the organization CURRENT_ACCOUNT_NAME() WJ64893 the account's NAME CURRENT_ACCOUNT() PG65914 the account's LOCATOR — a different value CURRENT_REGION() AWS_EU_WEST_1
The two URLs are built from different halves of that, and both are LOWER-cased where the identifiers themselves are upper — also measured:
account_url https://twepwdt-wj64893.snowflakecomputing.com org-name account_locator_url https://pg65914.eu-west-1.snowflakecomputing.com locator.cloud-region
The locator URL's region slug drops the cloud prefix and swaps underscores for dashes
(AWS_EU_WEST_1 to eu-west-1). That derivation comes from a single measured pair, so
it is a reasonable reading rather than a confirmed rule across clouds.
The region is bare. CURRENT_REGION() answers AWS_EU_WEST_1, not
PUBLIC.AWS_EU_WEST_1. The <region_group>.<region> spelling is real but belongs to an
organization spanning multiple region groups, so it is reachable by configuring
snowflake.region with the prefix rather than being the default. Note that SHOW ACCOUNTS has
no region_group column at all — asking for one is an invalid identifier there.
-
Constructor Summary
ConstructorsConstructorDescriptionAccountIdentity(String organization, String accountName, String accountLocator, String region) Assembles an identity from the four identifiers verbatim — nothing is folded or derived here; the URL accessors do their lower-casing on read. -
Method Summary
Modifier and TypeMethodDescriptionAsCURRENT_ACCOUNT()answers it — the account's LOCATOR, a different value than its name.https://<locator>.<cloud-region>.snowflakecomputing.com, lower-cased.AsCURRENT_ACCOUNT_NAME()answers it — the account's NAME, not its locator.https://<org>-<account>.snowflakecomputing.com, lower-cased.AsCURRENT_ORGANIZATION_NAME()answers it.AsCURRENT_REGION()answers it — whatever was configured, prefix and all.static AccountIdentityof(EngineConfig config) The identity a configuration describes.
-
Constructor Details
-
AccountIdentity
public AccountIdentity(String organization, String accountName, String accountLocator, String region) Assembles an identity from the four identifiers verbatim — nothing is folded or derived here; the URL accessors do their lower-casing on read.- Parameters:
organization- the organization name, asCURRENT_ORGANIZATION_NAME()answers itaccountName- the account's name, asCURRENT_ACCOUNT_NAME()answers itaccountLocator- the account's locator, asCURRENT_ACCOUNT()answers itregion- the region, asCURRENT_REGION()answers it
-
-
Method Details
-
of
The identity a configuration describes.- Parameters:
config- the configuration whose organization, account name, locator and region to read; null means a defaultEngineConfig- Returns:
- the identity those four settings assemble
-
getOrganization
AsCURRENT_ORGANIZATION_NAME()answers it.- Returns:
- the organization name, verbatim as configured
-
getAccountName
AsCURRENT_ACCOUNT_NAME()answers it — the account's NAME, not its locator.- Returns:
- the account name, verbatim as configured
-
getAccountLocator
AsCURRENT_ACCOUNT()answers it — the account's LOCATOR, a different value than its name.- Returns:
- the account locator, verbatim as configured
-
getRegion
AsCURRENT_REGION()answers it — whatever was configured, prefix and all.- Returns:
- the region, verbatim as configured
-
getAccountUrl
https://<org>-<account>.snowflakecomputing.com, lower-cased.- Returns:
- the account URL built from the organization and account name
-
getAccountLocatorUrl
https://<locator>.<cloud-region>.snowflakecomputing.com, lower-cased.- Returns:
- the locator URL built from the locator and the cloud-region slug
-