tarantool / tarantool/doc

TCS: batch insert/copy via jdbc (VTB)

Open
#5,261 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

TCS
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Related dev. resources:

Product: TCS
Since: 1.0
Audience/target: admins, end users (finops)
Root document: https://www.tarantool.io/ru/column-store/doc/latest/
SME: @ Galiev-Ruslan

Details

В документации отсутствует описание наличия механизма массовой загрузки данных с использованием jdbc.

Для выравнивания мы поддерживаем пакетную вставку:

INSERT INTO таблица (столбец1, столбец2) VALUES
(значение1_1, значение1_2),
(значение2_1, значение2_2),
(значение3_1, значение3_2);

Пример кода:

    static String rawTextInsert = "INSERT INTO t VALUES(1, 1, '1', true)";

    static void runBatchInsert(Connection conn) throws SQLException {
        try (var statement = conn.prepareStatement(singleRowPreparedInsert)) {
            for (int i = 2; i <= 5; ++i) {
                statement.setInt(1, i);
                statement.setInt(2, i);
                statement.setString(3, String.format("%d", i));
                statement.setBoolean(4, true);
                statement.addBatch();
            }
            statement.executeBatch();
        }
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.