vertica-stream-writer

A pom for deploying to maven central.

Лицензия

Лицензия

Группа

Группа

com.github.jcustenborder
Идентификатор

Идентификатор

vertica-stream-writer
Последняя версия

Последняя версия

0.0.1.15
Дата

Дата

Тип

Тип

jar
Описание

Описание

vertica-stream-writer
A pom for deploying to maven central.
Ссылка на сайт

Ссылка на сайт

https://github.com/jcustenborder/vertica-stream-writer
Система контроля версий

Система контроля версий

https://github.com/jcustenborder/vertica-stream-writer

Скачать vertica-stream-writer

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.jcustenborder/vertica-stream-writer/ -->
<dependency>
    <groupId>com.github.jcustenborder</groupId>
    <artifactId>vertica-stream-writer</artifactId>
    <version>0.0.1.15</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jcustenborder/vertica-stream-writer/
implementation 'com.github.jcustenborder:vertica-stream-writer:0.0.1.15'
// https://jarcasting.com/artifacts/com.github.jcustenborder/vertica-stream-writer/
implementation ("com.github.jcustenborder:vertica-stream-writer:0.0.1.15")
'com.github.jcustenborder:vertica-stream-writer:jar:0.0.1.15'
<dependency org="com.github.jcustenborder" name="vertica-stream-writer" rev="0.0.1.15">
  <artifact name="vertica-stream-writer" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jcustenborder', module='vertica-stream-writer', version='0.0.1.15')
)
libraryDependencies += "com.github.jcustenborder" % "vertica-stream-writer" % "0.0.1.15"
[com.github.jcustenborder/vertica-stream-writer "0.0.1.15"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 18.0
org.apache.commons : commons-compress jar 1.13
org.anarres.lzo : lzo-core Необязательный jar 1.0.5

provided (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.21

test (4)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-engine jar 5.0.0-M3
org.junit.jupiter : junit-jupiter-api jar 5.0.0-M3
org.mockito : mockito-core jar 1.10.19
ch.qos.logback : logback-classic jar 1.1.8

Модули Проекта

Данный проект не имеет модулей.

Maven Central

Introduction

This library is a helper library to stream data in the Vertica Native Binary Format. The goal is to use a VerticaCopyStream to import data to Vertica in the most efficient way possible.

Dependency

<dependency>
    <groupId>com.github.jcustenborder</groupId>
    <artifactId>vertica-stream-writer</artifactId>
    <version>[0.0.1.1,]</version>
</dependency>

LZO Support

LZO compression support is optional due to the licensing with the upstream library. To enable it you must add the following to your pom to bring in the library.

<dependency>
    <groupId>org.anarres.lzo</groupId>
    <artifactId>lzo-core</artifactId>
    <version>1.0.5</version>    
</dependency>

Example

Below is a direct example of building the example file defined in the Vertica Documentation Creating Native Binary Format Files

    VerticaStreamWriterBuilder streamWriterBuilder = new VerticaStreamWriterBuilder()
        .table("allTypes")
        .column("INTCOL", VerticaType.INTEGER, 8)
        .column("FLOATCOL", VerticaType.FLOAT)
        .column("CHARCOL", VerticaType.CHAR, 10)
        .column("VARCHARCOL", VerticaType.VARCHAR)
        .column("BOOLCOL", VerticaType.BOOLEAN)
        .column("DATECOL", VerticaType.DATE)
        .column("TIMESTAMPCOL", VerticaType.TIMESTAMP)
        .column("TIMESTAMPTZCOL", VerticaType.TIMESTAMPTZ)
        .column("TIMECOL", VerticaType.TIME)
        .column("TIMETZCOL", VerticaType.TIMETZ)
        .column("VARBINCOL", VerticaType.VARBINARY)
        .column("BINCOL", VerticaType.BINARY, 3)
        .column("NUMCOL", VerticaType.NUMERIC, 38, 0)
        .column("INTERVALCOL", VerticaType.INTERVAL);

    Object[] row = new Object[]{
        1,
        -1.11D,
        "one       ",
        "ONE",
        true,
        new Date(915753600000L),
        new Date(919739512350L),
        date("yyyy-MM-dd HH:mm:ssX", "1999-01-08 07:04:37-05"),
        date("HH:mm:ss", "07:09:23"),
        date("HH:mm:ssX", "15:12:34-05"),
        BaseEncoding.base16().decode("ABCD"),
        BaseEncoding.base16().decode("ABCD"),
        BigDecimal.valueOf(1234532),
        (Duration.ofHours(3).plusMinutes(3).plusSeconds(3).toMillis() * 1000L)
    };

    assertEquals(14, streamWriterBuilder.columnInfos.size(), "column count should match.");

    final String actual;

    try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
      try (VerticaStreamWriter streamWriter = streamWriterBuilder.build(outputStream)) {
        streamWriter.write(row);
      }
    }

Версии библиотеки

Версия
0.0.1.15
0.0.1.14
0.0.1.13
0.0.1.12
0.0.1.11
0.0.1.10
0.0.1.9
0.0.1.8
0.0.1.7
0.0.1.6
0.0.1.5
0.0.1.3
0.0.1.2