/
githubmirror
/
ydb-importer
Обзор
Документация
Войти
/
githubmirror
/
ydb-importer
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
scripts/sample-mysql.xml
72 строки
3 KB
Pavel Chichev
Rename pool to reader-pool in sample configs
07 май 2026, 16:20
07 май 2026, 16:20
1304d35
Код
Авторство
О чём код?
<?xml version="1.0" encoding="UTF-8"?> <!-- MySQL to YDB importer job configuration example --> <ydb-importer> <workers> <reader-pool size="4"/> </workers> <source type="mysql"> <jdbc-class>com.mysql.cj.jdbc.Driver</jdbc-class> <!-- org.mariadb.jdbc.Driver --> <jdbc-url>jdbc:mysql://hostname:3306/dbname</jdbc-url> <!-- jdbc:mariadb://hostname:3306/dbname --> <username>username</username> <password>password</password> </source> <target type="ydb"> <script-file>sample-mysql.yql.tmp</script-file> <connection-string>grpcs://ydb.serverless.yandexcloud.net:2135?database=/ru-central1/b1gfvslmokutuvt2g019/etn63999hrinbapmef6g</connection-string> <!-- <connection-string>grpcs://hostname.demo.com:2135?database=/local</connection-string> --> <!-- Custom TLS certificate file, if needed <tls-certificate-file>ca.crt</tls-certificate-file> --> <!-- ENV, NONE, STATIC, METADATA, SAKEY --> <auth-mode>ENV</auth-mode> <!-- auth-mode: STATIC <static-login>username</static-login> <static-password>password</static-password> --> <!-- auth-mode: SAKEY <sa-key-file>ydb-sa-keyfile.json</sa-key-file> --> <replace-existing>true</replace-existing> <load-data>true</load-data> <max-batch-rows>1000</max-batch-rows> <max-blob-rows>200</max-blob-rows> </target> <table-options name="default"> <!-- ASIS, LOWER, UPPER --> <case-mode>ASIS</case-mode> <!-- Substitution values: ${schema}, ${table} --> <table-name-format>mysql1/${schema}/${table}</table-name-format> <!-- Substitution values: ${schema}, ${table}, ${field} --> <blob-name-format>mysql1/${schema}/${table}_${field}</blob-name-format> <!-- DATE_NEW, DATE, INT, STR --> <conv-date>DATE_NEW</conv-date> <conv-timestamp>DATE_NEW</conv-timestamp> <allow-custom-decimal>true</allow-custom-decimal> <skip-unknown-types>true</skip-unknown-types> </table-options> <table-map options="default"> <include-schemas regexp="true">.*</include-schemas> </table-map> <!-- Note the case for the table and column names below. Generally they are case-insensitive, however, for the Importer to work properly, case below should match the case in which the objects are named in the database. --> <table-ref options="default"> <schema-name>information_schema</schema-name> <table-name>COLUMNS</table-name> <key-column>TABLE_SCHEMA</key-column> <key-column>TABLE_NAME</key-column> <key-column>COLUMN_NAME</key-column> </table-ref> <table-ref options="default"> <schema-name>information_schema</schema-name> <table-name>tables</table-name> <query-text>SELECT * FROM information_schema.`tables`</query-text> <key-column>TABLE_SCHEMA</key-column> <key-column>TABLE_NAME</key-column> </table-ref> </ydb-importer>