---
title: influx transpile
description: The influx transpile command transpiles an InfluxQL query to Flux source code.
url: https://docs.influxdata.com/influxdb/cloud/reference/cli/influx/transpile/
estimated_tokens: 707
product: InfluxDB Cloud (TSM)
version: cloud
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/cloud/reference/cli/influx/transpile/
date: '2025-06-04T17:05:34-05:00'
lastmod: '2025-06-04T17:05:34-05:00'
---

* influx CLI 2.0.0 – 2.0.5

### Removed in influx CLI v2.0.5

The `influx transpile` command was removed in **v2.0.5** of the `influx` CLI.[Use InfluxQL to query InfluxDB](/influxdb/cloud/query-data/influxql/).
For information about manually converting InfluxQL queries to Flux, see:

* [Get started with Flux](/flux/v0/get-started/)
* [Query data with Flux](/influxdb/cloud/query-data/flux/)
* [Migrate continuous queries to Flux tasks](/influxdb/cloud/upgrade/v1-to-cloud/migrate-cqs/)

The `influx transpile` command transpiles an InfluxQL query to Flux source code.
The transpiled query assumes the bucket name is `<database>/<retention policy>`and includes absolute time ranges using the provided `--now` time.

## Usage

```
influx transpile [InfluxQL query] [flags]
```

> [!Note]
> The InfluxQL query must be valid and contain both a database and measurement.
> See the [InfluxQL documentation](/influxdb/v1/query_language/) for more information.

## Flags

|Flag|        |                               Description                                |
|----|--------|--------------------------------------------------------------------------|
|`-h`|`--help`|                     Help for the `transpile` command                     |
|    |`--now` |RFC3339Nano timestamp to use as `now()` time (default is current UTC time)|

## Examples

#### Authentication credentials

The examples below assume your InfluxDB **host**, **organization**, and **token** are
provided by either the [active `influx` CLI configuration](/influxdb/cloud/reference/cli/influx/#provide-required-authentication-credentials) or by environment variables (`INFLUX_HOST`, `INFLUX_ORG`, and `INFLUX_TOKEN`).
If you do not have a CLI configuration set up or the environment variables set, include these required credentials for each command with the following flags:

* `--host`: [InfluxDB host](/influxdb/cloud/reference/urls/)
* `-o, --org` or `--org-id`: InfluxDB organization name or ID
* `-t, --token`: InfluxDB API token

##### Transpile InfluxQL queries to Flux

```sh
## Transpile an InfluxQL query that specifies the database,
## retention policy, and measurement.
influx transpile 'SELECT example-field FROM db.rp.measurement'

## Transpile InfluxQL query using default retention policy
influx transpile 'SELECT example-field FROM db..measurement'
```

#### Related

* [influx CLI—Provide required authentication credentials](/influxdb/cloud/reference/cli/influx/#provide-required-authentication-credentials)
* [influx CLI—Flag patterns and conventions](/influxdb/cloud/reference/cli/influx/#flag-patterns-and-conventions)
| Flag |  | Description |
| --- | --- | --- |
| Flag |  | Description |
| -h | --help | Help for the  transpile  command |
|  | --now | RFC3339Nano timestamp to use as  now()  time (default is current UTC time) |
