> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# weight_col

#### `weight_col: <table.column>` (Optional)

## Description

`weight_col` specifies the target-table column used to generate a canonical `WEIGHT` column in the training table.

This enables native weighted training directly from training table generation, without requiring a custom weighted training table override.

* `weight_col` must be in strict `table.column` form.

* `weight_col` must reference a column on the inferred target table.

* The referenced column must be numerical (`int`, `float`, or `decimal`).

* Expressions are not supported (for example: `SUM(...)`, `AVG(...)`, `MAX(...)`, `COUNT(*)`).

* When set, training table generation produces a canonical `WEIGHT` column.

* Rows with null `WEIGHT` are dropped before final stats/materialization.

* For link prediction (non-array targets), if multiple rows map to one `(ENTITY, TARGET[, time bucket])`, `WEIGHT` is aggregated with `MAX` by default.

* For `LIST_DISTINCT` array-target link prediction, weights are aggregated per `(ENTITY, TARGET)` and emitted as a list aligned with `TARGET`.

* For temporal link prediction, weight aggregation is bucket-local and uses the same time bucketing as label construction.

* For binary classification, if both `weight_col` and `majority_sampling_ratio` are set, both are applied according to [weight\_mode](/reference/weight_mode).

### Supported Task Types

* All static queries
* Temporal link prediction

Not supported for temporal node prediction and forecasting.

### Example

```Text Field
weight_col: <table.column>
weight_col: TRANSACTIONS.AMOUNT
weight_col: ORDERS.ORDER_VALUE
```

```yaml YAML
training_table_generation:
  weight_col: TRANSACTIONS.AMOUNT
optimization:
  weight_mode:
  - weighted_loss
```

```yaml With MSR
training_table_generation:
  weight_col: TRANSACTIONS.AMOUNT
optimization:
  majority_sampling_ratio:
  - 20
  weight_mode:
  - sample
```

### Default Values

| run\_mode | Default Value |
| --------- | ------------- |
| FAST      | None          |
| NORMAL    | None          |
| BEST      | None          |