Variable (DB)

Use to define variables created from data fields of the input data set, forming a new table or view.

Information at a Glance

Category Transform
Data source type DB
Sends output to other operators Yes
Data processing tool n/a
Note: The Variable (DB) operator is for database data only. For Hadoop data, use the Variable (HD) operator.
Important: The created variables are static in nature. They cannot dynamically change during runtime.

The Variable operator also allows users to divide the data rows into quantiles, adding quantile variables to the data. Dividing the data into such smaller and smaller divisions (quantiles) provides an understanding of the overall data distribution patterns.

Input

An operator that can output a data set.

Configuration

Parameter Description
Notes Any notes or helpful information about this operator's parameter settings. When you enter content in the Notes field, a yellow asterisk is displayed on the operator.
Variables Define the expression(s) to create the new Variable column(s).

For details, see Define Variables dialog box.

Quantile Variables If the new variable to create is a quantile variable, select the required column(s) to use for deriving the quantiles.

The possible quantile types are Average Ascend (which automatically creates the bins) and Customize (which manually defines the variable bins).

Note: Automated variable binning can run on only databases that support NTILE, such as Greenplum, Postgres, Oracle, and SQL Server. It is not supported on databases such as Teradata, MySQL, and MariaDB that do not currently support NTILE.

See Define Quantile Variables dialog box for more information.

Columns See Select Columns dialog box.
Output Type
  • TABLE outputs a database table. Specifying TABLE enables Storage Parameters.
  • VIEW outputs a database view.
Output Schema The schema for the output table or view.
Output Table The table path and name where the results are output. By default, this is a unique table name based on your user ID, workflow ID, and operator.
Storage Parameters Advanced database settings for the operator output. Available only for TABLE output.

See Storage Parameters Dialog Box for more information.

Drop If Exists Specifies whether to overwrite an existing table.
  • Yes - If a table with the name exists, it is dropped before storing the results.
  • No - If a table with the name exists, the results window shows an error message.

Output

Visual Output
The data rows of the output table or view displayed. The new Variable columns, such as morethan3k in the example below, are displayed.

To see all of the data rows in addition to the derived variables, select all columns for the Columns parameter.



Data Output
A data set of the newly created table or view.

Additional Notes

The Variable operator also provides the following useful functions.