worldcities-import:演示如何使用 uniVocity 将数据从文件加载到数据库的快速教程-源码

上传者: 42134094 | 上传时间: 2021-07-03 09:10:04 | 文件大小: 45KB | 文件类型: ZIP
使用 uniVocity 导入世界城市 创建这个简单的项目是为了演示如何用于加载/转换大量数据,以及它是如何执行的。 我们将使用免费提供的几个文件。 一个是超过 300 万行的 CSV 文件,其中包含有关世界上所有城市的信息。 此文件的大小可能会带来一些问题,尤其是当您需要将数据加载到不同的数据库模式时。 此外,还存在不一致的情况,例如数据不完整和城市重复,我们将尝试解决这些问题。 我们为您创建了两个示例: [MigrateWorldCities.java] (./src/main/java/com/univocity/articles/importcities/MigrateWorldCities.java) - 将和文件迁移到数据库表和。 我们将使用 uniVocity 来管理插入每个region记录时生成的键,并在region_id列中创建具有一致外键值的city记录。 在这

文件下载

资源详情

[{"title":"( 49 个子文件 45KB ) worldcities-import:演示如何使用 uniVocity 将数据从文件加载到数据库的快速教程-源码","children":[{"title":"worldcities-import-master","children":[{"title":"pom.xml <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.m2e.core.prefs <span style='color:#111;'> 87B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 120B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"connection.properties <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"logback.xml <span style='color:#111;'> 723B </span>","children":null,"spread":false},{"title":"database","children":[{"title":"oraclexe","children":[{"title":"metadata.tbl <span style='color:#111;'> 385B </span>","children":null,"spread":false},{"title":"city.tbl <span style='color:#111;'> 294B </span>","children":null,"spread":false},{"title":"region.tbl <span style='color:#111;'> 126B </span>","children":null,"spread":false},{"title":"worldcities.tbl <span style='color:#111;'> 279B </span>","children":null,"spread":false},{"title":"metadata_tmp.tbl <span style='color:#111;'> 183B </span>","children":null,"spread":false},{"title":"scripts.sql <span style='color:#111;'> 627B </span>","children":null,"spread":false}],"spread":true},{"title":"hsqldb","children":[{"title":"metadata.tbl <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"city.tbl <span style='color:#111;'> 286B </span>","children":null,"spread":false},{"title":"region.tbl <span style='color:#111;'> 117B </span>","children":null,"spread":false},{"title":"worldcities.tbl <span style='color:#111;'> 271B </span>","children":null,"spread":false},{"title":"metadata_tmp.tbl <span style='color:#111;'> 176B </span>","children":null,"spread":false}],"spread":true},{"title":"sqlserver","children":[{"title":"metadata.tbl <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"city.tbl <span style='color:#111;'> 308B </span>","children":null,"spread":false},{"title":"region.tbl <span style='color:#111;'> 139B </span>","children":null,"spread":false},{"title":"worldcities.tbl <span style='color:#111;'> 294B </span>","children":null,"spread":false},{"title":"metadata_tmp.tbl <span style='color:#111;'> 176B </span>","children":null,"spread":false}],"spread":true},{"title":"mysql","children":[{"title":"metadata.tbl <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"city.tbl <span style='color:#111;'> 318B </span>","children":null,"spread":false},{"title":"region.tbl <span style='color:#111;'> 147B </span>","children":null,"spread":false},{"title":"worldcities.tbl <span style='color:#111;'> 304B </span>","children":null,"spread":false},{"title":"metadata_tmp.tbl <span style='color:#111;'> 176B </span>","children":null,"spread":false}],"spread":true},{"title":"postgres","children":[{"title":"metadata.tbl <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"city.tbl <span style='color:#111;'> 285B </span>","children":null,"spread":false},{"title":"region.tbl <span style='color:#111;'> 116B </span>","children":null,"spread":false},{"title":"worldcities.tbl <span style='color:#111;'> 271B </span>","children":null,"spread":false},{"title":"metadata_tmp.tbl <span style='color:#111;'> 176B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"univocity","children":[{"title":"articles","children":[{"title":"importcities","children":[{"title":"EtlProcess.java <span style='color:#111;'> 7.58KB </span>","children":null,"spread":false},{"title":"MigrateWorldCities.java <span style='color:#111;'> 8.10KB </span>","children":null,"spread":false},{"title":"LoadWorldCities.java <span style='color:#111;'> 3.31KB </span>","children":null,"spread":false},{"title":"databases","children":[{"title":"DatabaseFactory.java <span style='color:#111;'> 4.70KB </span>","children":null,"spread":false},{"title":"OracleXEDatabase.java <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false},{"title":"PostgresDatabase.java <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"MySqlDatabase.java <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"SqlServerDatabase.java <span style='color:#111;'> 646B </span>","children":null,"spread":false},{"title":"Database.java <span style='color:#111;'> 6.23KB </span>","children":null,"spread":false},{"title":"HsqlDatabase.java <span style='color:#111;'> 835B </span>","children":null,"spread":false}],"spread":false},{"title":"RequestLicense.java <span style='color:#111;'> 582B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"ADD_DB.md <span style='color:#111;'> 3.93KB </span>","children":null,"spread":false},{"title":".project <span style='color:#111;'> 547B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 25.40KB </span>","children":null,"spread":false},{"title":"LICENSE.txt <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明