---
title: influx transpile
description: The influx transpile command transpiles an InfluxQL query to Flux source code.
url: https://docs.influxdata.com/influxdb3/cloud-serverless/reference/cli/influx/transpile/
estimated_tokens: 689
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb3/cloud-serverless/reference/cli/influx/transpile/
date: '2025-04-02T15:54:32-06:00'
lastmod: '2025-04-02T15:54:32-06: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 [SQL](/influxdb3/cloud-serverless/query-data/sql/execute-queries/) or [InfluxQL](/influxdb3/cloud-serverless/query-data/influxql/execute-queries/) tools to query a InfluxDB Cloud Serverless bucket.

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-serverless/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-serverless/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](/influxdb3/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials)
* [influx CLI—Provide required authentication credentials](/influxdb3/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials)
| Flag |  | Description |
| --- | --- | --- |
| Flag |  | Description |
| -h | --help | Help for the  transpile  command |
|  | --now | RFC3339Nano timestamp to use as  now()  time (default is current UTC time) |
