TCS: batch insert/copy via jdbc (VTB)
Open
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:
- Release card for TCS 1.0: https://jira.vk.team/browse/PRODUCTS-1967
- Dev ticket: none
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.