USE
USE declares namespace context for the statements that follow it in the same multi-statement request.
Syntax
USE namespace [AS _alias]
[, namespace [AS _alias] ...]An unaliased namespace becomes the default for unqualified feature references. An aliased namespace is referenced as _alias.FEATURE.
USE
FM.SALES,
FM.CUSTOMERS AS _customers;
RETURN
NET_REVENUE,
CUSTOMER_SEGMENT := _customers.SEGMENT;
Constraints
- Namespaces must begin with
FM.. - Alias names must begin with
_. - A statement can have only one unaliased default namespace across
USEandFROM. - Fully qualified
FM.names are unaffected byUSE. - Features defined in
DEFINEremain local. USEaffects only the multi-statement request in which it appears; it does not change registry state.- Script-level order is
USE, then at most oneON BRANCH, then at most oneAS OF, then the rest. See Revision context .
For name resolution order and examples, see Namespaces and aliases .
On this page