U-SQL Packages


A U-SQL package allows the bundling of commonly used constant declarations, assembly references and resource deployments in a single meta data object to make sharing and referencing easier.

U-SQL packages can be nested, and can encapsulate references to use or export to the caller/importer of the package.

Packages can be parameterized (e.g. for context or versioning).

The identifiers referenced inside a package definition will be resolved in the static context of the package definition, similarly to table-valued functions and procedures.

If conflicting assemblies or references are being referenced, imported or deployed, errors are raised once a package gets imported in the main U-SQL script.

Since packages are a meta data object they are subject to the database-level access control.


No DDL is allowed inside a package (e.g. CREATE/ALTER/DROP .. etc).


Package_DDL_Statement :=                                                                                 
|    Drop_Package_Statement.
Import_Package_Statement := Import_Package_Statement.

See Also