![]() |
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 QuickBooks Online, you can easily import QuickBooks Online 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 QuickBooks Online data for use in enterprise search.
CData provides the easiest way to access and integrate live data from QuickBooks Online. Customers use CData connectivity to:
Many users access live QuickBooks Online data from preferred analytics tools like Power BI and Excel, directly from databases with federated access, and use CData solutions to easily integrate QuickBooks Online data with automated workflows for business-to-business communications.
For more information on how customers are solving problems with CData's QuickBooks Online solutions, refer to our blog: https://www.cdata.com/blog/360-view-of-your-customers.
> 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
QuickBooksOnlineUniqueKeyπ Define schema in Solr for QuickBooks Online data.
Now we are ready to use QuickBooks Online 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.quickbooksonline.QuickBooksOnlineDriver" url="jdbc:quickbooksonline:InitiateOAuth=GETANDREFRESH;">
</dataSource>
<document>
<entity name="Customers"
query="SELECT Id,QuickBooksOnlineColumn1,QuickBooksOnlineColumn2,QuickBooksOnlineColumn3,QuickBooksOnlineColumn4,QuickBooksOnlineColumn5,QuickBooksOnlineColumn6,QuickBooksOnlineColumn7,LastModifiedDate FROM Customers"
deltaQuery="SELECT Id FROM Customers where LastModifiedDate >= '${dataimporter.last_index_time}'"
deltaImportQuery="SELECT Id,QuickBooksOnlineColumn1,QuickBooksOnlineColumn2,QuickBooksOnlineColumn3,QuickBooksOnlineColumn4,QuickBooksOnlineColumn5,QuickBooksOnlineColumn6,QuickBooksOnlineColumn7,LastModifiedDate FROM Customers where Id=${dataimporter.delta.Id}">
<field column="Id" name="Id" ></field>
<field column="QuickBooksOnlineColumn1" name="QuickBooksOnlineColumn1" ></field>
<field column="QuickBooksOnlineColumn2" name="QuickBooksOnlineColumn2" ></field>
<field column="QuickBooksOnlineColumn3" name="QuickBooksOnlineColumn3" ></field>
<field column="QuickBooksOnlineColumn4" name="QuickBooksOnlineColumn4" ></field>
<field column="QuickBooksOnlineColumn5" name="QuickBooksOnlineColumn5" ></field>
<field column="QuickBooksOnlineColumn6" name="QuickBooksOnlineColumn6" ></field>
<field column="QuickBooksOnlineColumn7" name="QuickBooksOnlineColumn7" ></field>
<field column="LastModifiedDate" name="LastModifiedDate" ></field>
</entity>
</document>
</dataConfig>> solr stop -all > solr start
Using the CData JDBC Driver for QuickBooks Online you are able to create an automated import of QuickBooks Online 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 QuickBooks Online Driver to get started:
Download NowLearn more:
π QuickBooks Online IconComplete read-write access to QuickBooks Online enables developers to search (Customers, Transactions, Invoices, Sales Receipts, etc.), update items, edit customers, and more, from any Java/J2EE application.