Is it possible to import data from SQL to MarkLogic

筅森魡賤 提交于 2019-12-08 10:52:13

问题


I'm trying to pull data from an existing SQL database into MarkLogic. There are several functions for importing documents and several ways of doing so, but the goal is to pull each row of data from each table into a MarkLogic forest as it's own document. (https://developer.marklogic.com/learn/sql-marklogic-mapping/)

I have setup SQLdata and SQLschema as explained in the guide here: https://docs.marklogic.com/guide/sql/setup. I also setup an ODBC server on MarkLogic, but none of the documentation I have come across covers how to parse through a SQL database to pull the information to MarkLogic.


回答1:


The most "out of the box" way to do this is in my opinion is to integrate MarkLogic and Apache NiFi. There's a good, short video of pulling in relational data into MarkLogic via NiFi on YouTube you can watch to give you an idea of how it works. I've done this several times recently and found it relatively quick and straightforward to setup.




回答2:


Using Apache NiFi is the preferred approach, but you may find the MarkLogic Migration Starter kit useful as well:

a starter kit for creating an application that uses Spring Batch and marklogic-spring-batch for migrating data from any RDBMS into MarkLogic. The intent is to simplify the process of creating a migration application using Spring Batch by leveraging the reusable components in marklogic-spring-batch, and by organizing a Gradle-based project for you that you can clone/fork/etc to quickly extend and customize for your specific needs.

The migration kit might allows deeper integrating into existing tooling.

For further detail, see: https://developer.marklogic.com/code/ml-migration-starter/

HTH!



来源:https://stackoverflow.com/questions/56875291/is-it-possible-to-import-data-from-sql-to-marklogic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!