![]() |
VOOZH | about |
The Apache Solr platform is a popular, blazing-fast, open source enterprise search solution built on Apache Lucene.
Apache Solr is equipped with the Data Import Handler (DIH), which can import data from databases and, XML, CSV, and JSON files. When paired with the CData JDBC Driver for NetSuite, you can easily import NetSuite data to Apache Solr. In this article, we show step-by-step how to use CData JDBC Driver in Apache Solr Data Import Handler and import NetSuite data for use in enterprise search.
CData provides the easiest way to access and integrate live data from Oracle NetSuite. Customers use CData connectivity to:
Customers use CData solutions to access live NetSuite data from their preferred analytics tools, Power BI and Excel. They also use CData's solutions to integrate their NetSuite data into comprehensive databases and data warehouse using CData Sync directly or leveraging CData's compatibility with other applications like Azure Data Factory. CData also helps Oracle NetSuite customers easily write apps that can pull data from and push data to NetSuite, allowing organizations to integrate data from other sources with NetSuite.
For more information about our Oracle NetSuite solutions, read our blog: Drivers in Focus Part 2: Replicating and Consolidating ... NetSuite Accounting Data.
> solr create -c CDataCoreFor this article, Solr is running as a standalone instance in the local environment and you can access the core at this URL: http://localhost:8983/solr/#/CDataCore/core-overview
NetSuiteUniqueKeyπ Define schema in Solr for NetSuite data.
Now we are ready to use NetSuite data in Solr.
In this section, we walk through configuring the Data Import Handler.
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">solr-data-config.xml</str>
</lst>
</requestHandler>
<dataConfig>
<dataSource driver="cdata.jdbc.netsuite.NetSuiteDriver" url="jdbc:netsuite:Account Id=XABC123456;Password=password;User=user;Role Id=3;Version=2013_1;">
</dataSource>
<document>
<entity name="SalesOrder"
query="SELECT Id,NetSuiteColumn1,NetSuiteColumn2,NetSuiteColumn3,NetSuiteColumn4,NetSuiteColumn5,NetSuiteColumn6,NetSuiteColumn7,LastModifiedDate FROM SalesOrder"
deltaQuery="SELECT Id FROM SalesOrder where LastModifiedDate >= '${dataimporter.last_index_time}'"
deltaImportQuery="SELECT Id,NetSuiteColumn1,NetSuiteColumn2,NetSuiteColumn3,NetSuiteColumn4,NetSuiteColumn5,NetSuiteColumn6,NetSuiteColumn7,LastModifiedDate FROM SalesOrder where Id=${dataimporter.delta.Id}">
<field column="Id" name="Id" ></field>
<field column="NetSuiteColumn1" name="NetSuiteColumn1" ></field>
<field column="NetSuiteColumn2" name="NetSuiteColumn2" ></field>
<field column="NetSuiteColumn3" name="NetSuiteColumn3" ></field>
<field column="NetSuiteColumn4" name="NetSuiteColumn4" ></field>
<field column="NetSuiteColumn5" name="NetSuiteColumn5" ></field>
<field column="NetSuiteColumn6" name="NetSuiteColumn6" ></field>
<field column="NetSuiteColumn7" name="NetSuiteColumn7" ></field>
<field column="LastModifiedDate" name="LastModifiedDate" ></field>
</entity>
</document>
</dataConfig>> solr stop -all > solr start
Using the CData JDBC Driver for NetSuite you are able to create an automated import of NetSuite data into Apache Solr. Download a free, 30 day trial of any of the hundreds of CData JDBC Drivers and get started today.
Download a free trial of the NetSuite Driver to get started:
Download NowLearn more:
π NetSuite IconRapidly create and deploy powerful Java applications that integrate with NetSuite account data including Leads, Contacts, Opportunities, Accounts, and more!