/
githubmirror
/
ydb-importer
Обзор
Документация
Войти
/
githubmirror
/
ydb-importer
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
scripts/sample-db2.xml
67 строк
3 KB
Pavel Chichev
Add dedicated DB2 lister
23 май 2026, 04:40
23 май 2026, 04:40
ad1383b
Код
Авторство
О чём код?
<?xml version="1.0" encoding="UTF-8"?> <!-- IBM Db2 to YDB importer job configuration example --> <ydb-importer> <workers> <reader-pool size="4"/> </workers> <source type="db2"> <jdbc-class>com.ibm.db2.jcc.DB2Driver</jdbc-class> <jdbc-url>jdbc:db2://hostname:50000/SAMPLE</jdbc-url> <username>db2inst1</username> <password>password</password> </source> <target type="ydb"> <script-file>sample-db2.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>db2_1/${schema}/${table}</table-name-format> <!-- Substitution values: ${schema}, ${table}, ${field} --> <blob-name-format>db2_1/${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> <!-- Possible extra tags: include-tables, exclude-tables, exclude-schemas --> </table-map> <table-ref options="default"> <schema-name>SYSCAT</schema-name> <table-name>TABLES</table-name> <key-column>TABSCHEMA</key-column> <key-column>TABNAME</key-column> </table-ref> <table-ref options="default"> <schema-name>SYSCAT</schema-name> <table-name>COLUMNS</table-name> <query-text>SELECT * FROM SYSCAT.COLUMNS</query-text> <key-column>TABSCHEMA</key-column> <key-column>TABNAME</key-column> <key-column>COLNAME</key-column> </table-ref> </ydb-importer>