# getContextVariable

Returns the value of a context variable.

This function is only available in DSQL maps.

## Description

The getContextVariable function returns the value of a context variable defined in a Talend Studio Job.

Context variables allow you to parameterize DSQL scripts and maps with values that can change between different execution environments without modifying the DSQL code itself.

## Arguments

Name of the context variable as a string.

## Return value

The value of the specified context variable. The return type depends on the context variable type defined in the Job.

## Examples

| Expression | Description |
| --- | --- |
| getContextVariable('database\_host') | Returns the value of the database\_host context variable |
| getContextVariable('environment') | Returns the value of the environment context variable (e.g., "DEV", "PROD") |