How to get
This section describes how to build the Lakehouse sink connector. You can get the Lakehouse sink connector using one of the following methods:- Download the NAR package from the download page.
- Build it from the source code.
-
Clone the source code to your machine.
-
Build the connector in the
pulsar-io-lakehousedirectory.-
Build the NAR package for your local file system.
-
Build the NAR package for your cloud storage (Including AWS, GCS and Azure related package dependency).
-
Build the NAR package for your local file system.
How to configure
Before using the Lakehouse sink connector, you need to configure it. This table lists the properties and the descriptions.- Hudi
- Iceberg
- Delta Lake
For a list of Hudi configurations, see Write Client Configs.
The Lakehouse sink connector uses the Hadoop file system to read and write data to and from cloud objects, such as AWS, GCS, and Azure. If you want to configure Hadoop related properties, you should use the prefix
hadoop..Examples
You can create a configuration file (JSON or YAML) to set the properties if you use Pulsar Function Worker to run connectors in a cluster.- Hudi
- Iceberg
- Delta Lake
-
The Hudi table that is stored in the file system
-
The Hudi table that is stored in the AWS S3
Data format types
The Lakehouse sink connector provides multiple output format options, including Avro and Parquet. The default format is Parquet. With the current implementation, there are some limitations for different formats: This table lists the Pulsar Schema types supported by the writers.*: The Protobuf schema is based on the Avro schema. It uses Avro as an intermediate format, so it may not provide the best effort conversion. *: The ProtobufNative record holds the Protobuf descriptor and the message. When writing to Avro format, the connector uses avro-protobuf to do the conversion.
How to use
You can use the Lakehouse sink connector with Function Worker. You can use the Lakehouse sink connector as a non built-in connector or a built-in connector.- Use it as a non built-in connector
- Use it as a built-in connector
If you already have a Pulsar cluster, you can use the Lakehouse sink connector as a non built-in connector directly.This example shows how to create a Lakehouse sink connector on a Pulsar cluster using the
pulsar-admin sinks create command.