Skip to main content

PARAMETERS

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 11.3 LTS and above check marked yes Unity Catalog only

Preview

This feature is in Public Preview.

INFORMATION_SCHEMA.PARAMETERS lists the routine parameters within the catalog.

The rows returned are limited to the routines the user is privileged to interact with.

Definition

The PARAMETERS relation contains the following columns:

NameData typeNullableStandardDescription
SPECIFIC_CATALOGSTRINGNoYesCatalog containing the routine.
SPECIFIC_SCHEMASTRINGNoYesDatabase (schema) containing the routine.
SPECIFIC_NAMESTRINGNoYesSchema unique (specific) name of the routine.
ORDINAL_POSITIONINTEGERNoYesThe position (1-based) of the parameter in the routine parameter list.
PARAMETER_MODESTRINGNoYesAlways 'IN'. Reserved for future use.
IS_RESULTSTRINGNoYesAlways 'NO'. Reserved for future use.
AS_LOCATORSTRINGNoYesAlways 'NO'. Reserved for future use.
PARAMETER_NAMESTRINGYesYesName of the parameters, NULL if unnamed.
DATA_TYPESTRINGNoYesThe parameter data type name.
FULL_DATA_TYPESTRINGNoNoThe parameter data type definition, for example 'DECIMAL(10, 4)'.
CHARACTER_MAXIMUM_LENGTHINTEGERYesYesAlways NULL, reserved for future use.
CHARACTER_OCTET_LENGTHSTRINGYesYesAlways NULL, reserved for future use.
NUMERIC_PRECISIONINTEGERYesYesFor base-2 integral numeric types, FLOAT, and DOUBLE, the number of supported bits. For DECIMAL the number of digits, NULL otherwise.
NUMERIC_PRECISION_RADIXINTEGERYesYesFor DECIMAL 10, for all other numeric types 2, NULL otherwise.
NUMERIC_SCALEINTEGERYesYesFor integral numeric types 0, for DECIMAL the number of digits to the right of the decimal point, NULL otherwise.
DATETIME_PRECISIONINTEGERYesYesFor DATE 0, for TIMESTAMP, and INTERVALSECOND 3, any other INTERVAL 0, NULL otherwise.
INTERVAL_TYPESTRINGYesYesFor INTERVAL the unit portion of the interval, e.g. 'YEAR TO MONTH', NULL otherwise.
INTERVAL_PRECISIONINTERALYesYesAlways NULL, reserved for future use.
MAXIMUM_CARDINALITYINTEGERYesYesAlways NULL, reserved for future use.
PARAMETER_DEFAULTSTRINGYesYesAlways NULL, reserved for future use.
COMMENTSTRINGYesNoAn optional comment describing the parameter.

Constraints

The following constraints apply to the PARAMETERS relation:

ClassNameColumn ListDescription
Primary keyPARAMETERS_PKSPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, ORDINAL_POSITIONUniquely identifies the parameter.
Foreign keyPARAMETERS_ROUTINES_FKSPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAMEReferences ROUTINES_PK

Examples

SQL
> SELECT parameter_name, data_type
FROM information_schema.parameters
WHERE specific_schema = 'default'
AND specific_name = 'foo'
ORDER BY ordinal_position;