---
title: Utilities - Transform
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/utils/utils-transform
---

This page provides a comprehensive reference for utilities - transform available in the workflow automation actions catalog. These actions enable you to data transformation utilities.

## Convert to CSV [#utils-transform-toCSV]

This is used to transform various type of input (JSON, map) to a CSV format.

### Inputs

| Input         | Optionality | Type | Description                                                                           |
| ------------- | ----------- | ---- | ------------------------------------------------------------------------------------- |
| **data**      | Required    | any  | A string representing a data to transform into CSV, typically a JSON string or a map. |
| **selectors** | Optional    | List | The selectors to get the only specified parameters as output.                         |

### Outputs

| Field            | Optionality | Datatype | Description                                |
| ---------------- | ----------- | -------- | ------------------------------------------ |
| **csv**          | Required    | string   | A CSV representation of the data received. |
| **success**      |             | Boolean  | Status of the request                      |
| **errorMessage** |             | String   | Failure reason as message                  |

### Example

| Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Workflow Input                                                                                                                                                                                                                                                                                                                                                                                                                                   | Outputs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: nrqltocsv  steps:   - name: queryForLog     type: action     action: newrelic.nrql.query     version: 1     inputs:       accountIds: ['${{ .workflowInputs.accountId }}']       query: ${{ .workflowInputs.nrql }}    - name: csv1     type: action     action: utils.transform.toCSV     version: 1     inputs:       data: ${{ .steps.queryForLog.outputs.results | tostring }}       selectors:         - name: csv           expression: ".csv" ``` | ```yaml mutation {    startWorkflowRun(     accountId: 11933347     definition: {         name: "nrqltocsv",     }     workflowInputs: [       {key: "accountId" value: "11933347"}       {key: "nrql" value: "FROM TransactionError SELECT error.message, error.class, transactionName, request.uri, query WHERE appName like 'temporal-workflow-worker%' AND error.expected IS FALSE SINCE 1 hour ago LIMIT 50"}     ]   )    { runId } }  ``` | ```yaml error.class,error.message,query,request.uri,timestamp,transactionName "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561445470,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561445470,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561445470,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561445470,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561445470,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561445470,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561445470,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561445470,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439931,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439931,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439931,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439931,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439930,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439930,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439930,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439930,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439770,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439770,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439770,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439770,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561439769,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439560,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439560,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439559,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439559,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439559,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561439473,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421659,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421659,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421659,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421659,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421659,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421659,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421659,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421659,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421648,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421648,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421648,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421648,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561421648,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421648,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421648,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561421648,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561412587,Unknown "java.lang.RuntimeException","java.net.UnknownHostException: temporal-frontend.temporal.svc.cluster.local: Name or service not known",,,1720561412587,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561412587,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561412587,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561412587,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561412587,Unknown "io.grpc.StatusRuntimeException","UNAVAILABLE: Unable to resolve host temporal-frontend.temporal.svc.cluster.local",,,1720561412587,Unknown ``` |
