> For the complete documentation index, see [llms.txt](https://docs.selfuel.digital/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.selfuel.digital/data-integration-with-nexus/nexus-elements/connectors/sink/phoenix.md).

# Phoenix

> Phoenix sink connector

### Description[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#description) <a href="#description" id="description"></a>

Support Batch mode and Streaming mode. The tested Phoenix version is 4.xx and 5.xx On the underlying implementation, through the jdbc driver of Phoenix, execute the upsert statement to write data to HBase. Two ways of connecting Phoenix with Java JDBC. One is to connect to zookeeper through JDBC, and the other is to connect to queryserver through JDBC thin client.

> Tips: Not support exactly-once semantics (XA transaction is not yet supported in Phoenix).

### Key features[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#key-features) <a href="#key-features" id="key-features"></a>

* [ ] &#x20;exactly-once

### Options[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#options) <a href="#options" id="options"></a>

#### driver \[string][​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#driver-string) <a href="#driver-string" id="driver-string"></a>

if you use phoenix (thick) driver the value is `org.apache.phoenix.jdbc.PhoenixDriver` or you use (thin) driver the value is `org.apache.phoenix.queryserver.client.Driver`

#### url \[string][​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#url-string) <a href="#url-string" id="url-string"></a>

if you use phoenix (thick) driver the value is `jdbc:phoenix:localhost:2182/hbase` or you use (thin) driver the value is `jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`

#### common options[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#common-options) <a href="#common-options" id="common-options"></a>

Sink plugin common parameters, please refer to [Sink Common Options](/data-integration-with-nexus/nexus-elements/connectors/sink/sink-common-options.md) for details

### Example[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/sink/Phoenix#example) <a href="#example" id="example"></a>

use thick client drive

```
    Jdbc {
        driver = org.apache.phoenix.jdbc.PhoenixDriver
        url = "jdbc:phoenix:localhost:2182/hbase"
        query = "upsert into test.sink(age, name) values(?, ?)"
    }

```

use thin client drive

```
Jdbc {
    driver = org.apache.phoenix.queryserver.client.Driver
    url = "jdbc:phoenix:thin:url=http://spark_e2e_phoenix_sink:8765;serialization=PROTOBUF"
    query = "upsert into test.sink(age, name) values(?, ?)"
}
```
