> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# v1.ComputedAttribute

- Package: [@gooddata/sdk-code-schemas](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-code-schemas/src/v1/metadata.ts

**Signature:**

```typescript
export interface ComputedAttribute 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [data\_type?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributedata_type) |  | "INT" \| "STRING" \| "DATE" \| "NUMERIC" \| "TIMESTAMP" \| "TIMESTAMP\_TZ" \| "BOOLEAN" \| "HLL" | _(Optional)_ An optional data type of the computed values. Defaults to STRING on the backend. |
| [description?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributedescription) |  | string | _(Optional)_ An optional description of the computed attribute. |
| [format?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributeformat) |  | string | _(Optional)_ An optional Excel-like format string applied to the computed values. |
| [id](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributeid) |  | [Id8](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.id8/index.md) |  |
| [is\_nullable?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributeis_nullable) |  | boolean | _(Optional)_ Optional flag to indicate if the computed attribute can contain null values. |
| [locale?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributelocale) |  | [Locale3](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.locale3/index.md) | _(Optional)_ |
| [maql](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributemaql) |  | string | Define MAQL syntax for the computed attribute. Values are assigned with break points written as CASE WHEN branches over a metric, and the first matching branch wins. |
| [metric\_type?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributemetric_type) |  | "UNSPECIFIED" \| "CURRENCY" | _(Optional)_ An optional categorization of the computed values semantics, for example currency. |
| [null\_value\_join\_replacement?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributenull_value_join_replacement) |  | string | _(Optional)_ Optional value which can be used as replacement for NULL in join conditions. |
| [show\_in\_ai\_results?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributeshow_in_ai_results) |  | boolean | _(Optional)_ Optional flag to indicate if the computed attribute should be shown in AI results. When omitted, the computed attribute is visible. |
| [tags?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributetags) |  | [Tags9](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.tags9/index.md) | _(Optional)_ |
| [title?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributetitle) |  | string | _(Optional)_ An optional human readable title for the computed attribute. Will be derived from id if not provided explicitly. |
| [type](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributetype) |  | "computed\_attribute" |  |
| [value\_type?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-code-schemas/sdk-code-schemas.v1.computedattribute/index.md#v1computedattributevalue_type) |  | "TEXT" \| "HYPERLINK" \| "GEO" \| "GEO\_LONGITUDE" \| "GEO\_LATITUDE" \| "GEO\_AREA" \| "GEO\_ICON" \| "IMAGE" \| "HYPERLOGLOG" | _(Optional)_ An optional specific type of the computed values. Defaults to TEXT on the backend. |

## Property details

### v1.ComputedAttribute.data_type

An optional data type of the computed values. Defaults to STRING on the backend.

**Signature:**

```typescript
data_type?: "INT" | "STRING" | "DATE" | "NUMERIC" | "TIMESTAMP" | "TIMESTAMP_TZ" | "BOOLEAN" | "HLL";
```

### v1.ComputedAttribute.description

An optional description of the computed attribute.

**Signature:**

```typescript
description?: string;
```

### v1.ComputedAttribute.format

An optional Excel-like format string applied to the computed values.

**Signature:**

```typescript
format?: string;
```

### v1.ComputedAttribute.id

**Signature:**

```typescript
id: Id8;
```

### v1.ComputedAttribute.is_nullable

Optional flag to indicate if the computed attribute can contain null values.

**Signature:**

```typescript
is_nullable?: boolean;
```

### v1.ComputedAttribute.locale

**Signature:**

```typescript
locale?: Locale3;
```

### v1.ComputedAttribute.maql

Define MAQL syntax for the computed attribute. Values are assigned with break points written as CASE WHEN branches over a metric, and the first matching branch wins.

**Signature:**

```typescript
maql: string;
```

### v1.ComputedAttribute.metric_type

An optional categorization of the computed values semantics, for example currency.

**Signature:**

```typescript
metric_type?: "UNSPECIFIED" | "CURRENCY";
```

### v1.ComputedAttribute.null_value_join_replacement

Optional value which can be used as replacement for NULL in join conditions.

**Signature:**

```typescript
null_value_join_replacement?: string;
```

### v1.ComputedAttribute.show_in_ai_results

Optional flag to indicate if the computed attribute should be shown in AI results. When omitted, the computed attribute is visible.

**Signature:**

```typescript
show_in_ai_results?: boolean;
```

### v1.ComputedAttribute.tags

**Signature:**

```typescript
tags?: Tags9;
```

### v1.ComputedAttribute.title

An optional human readable title for the computed attribute. Will be derived from id if not provided explicitly.

**Signature:**

```typescript
title?: string;
```

### v1.ComputedAttribute.type

**Signature:**

```typescript
type: "computed_attribute";
```

### v1.ComputedAttribute.value_type

An optional specific type of the computed values. Defaults to TEXT on the backend.

**Signature:**

```typescript
value_type?: "TEXT" | "HYPERLINK" | "GEO" | "GEO_LONGITUDE" | "GEO_LATITUDE" | "GEO_AREA" | "GEO_ICON" | "IMAGE" | "HYPERLOGLOG";
```
