Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Fcommands-reference%2Fconvert.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Fcommands-reference%2Fconvert.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `convert`

## Description

The `convert` command is a **semantic keyword** that indicates type conversion is taking place. It has no effect on query execution and exists purely to make transformations more readable and self-documenting.

Note

The `convert` keyword is optional and does not change functionality. Use it when you want to make type changes explicit in your query.

## Syntax

```
(conv|convert) [datatypes] <keypath1>:<datatype1>, <keypath2>:<datatype2>, ...
```

## Example

**Use case: Make type conversions explicit for readability**

Suppose a dataset contains values like `status_code` stored as strings. You want to treat them as numeric values for sorting or comparison. Using `convert` signals the intended type conversion for clarity.

### Example data

```
{ "status_code": "200", "path": "/home" },

{ "status_code": "404", "path": "/error" }
```

### Example query

```
convert datatypes status_code:number
```

### Example output

```
  { "status_code": 200, "path": "/home" },

  { "status_code": 404, "path": "/error" }
```

While this transformation would happen the same way without `convert`, the keyword improves readability and communicates the intent to other users or maintainers of the query.
