Model Context Protocol (MCP) finally gives AI models a way to access the business data needed to make them really useful at work. CData MCP Servers have the depth and performance to make sure AI has access to all of the answers.
Try them now for free →Replicate NetSuite SuiteAnalytics Data to Multiple Databases via the CData Sync CLI
Replicate NetSuite SuiteAnalytics data to disparate databases with a single configuration.
Always-on applications rely on automatic failover capabilities and real-time access to data. CData Sync for NetSuite SuiteAnalytics integrates live NetSuite SuiteAnalytics data into your mirrored databases, always-on cloud databases, and other databases such as your reporting server: Automatically synchronize with remote NetSuite SuiteAnalytics data from Windows or any machine running Java.
You can use Sync's command-line interface (CLI) to easily control almost all aspects of the replication. You can use the CLI to replicate NetSuite SuiteAnalytics data to one or many databases without any need to change your configuration.
Connect to NetSuite SuiteAnalytics Data
You can save connection strings and other settings like email notifications in XML configuration files.
The following example shows how to replicate to SQLite.
Windows
<?xml version="1.0" encoding="UTF-8" ?> <CDataSync><DatabaseType>SQLite</DatabaseType> <DatabaseProvider>System.Data.SQLite</DatabaseProvider> <ConnectionString></ConnectionString> <ReplicateAll>False</ReplicateAll> <NotificationUserName></NotificationUserName> <DatabaseConnectionString>Data Source=C:\my.db</DatabaseConnectionString> <TaskSchedulerStartTime>09:51</TaskSchedulerStartTime> <TaskSchedulerInterval>Never</TaskSchedulerInterval> </CDataSync>
Java
<?xml version="1.0" encoding="UTF-8" ?> <CDataSync><DatabaseType>SQLite</DatabaseType><DatabaseProvider>org.sqlite.JDBC</DatabaseProvider> <ConnectionString></ConnectionString> <ReplicateAll>False</ReplicateAll> <NotificationUserName></NotificationUserName> <DatabaseConnectionString>Data Source=C:\my.db</DatabaseConnectionString> </CDataSync>
Prerequisites
Before you can connect to NetSuite SuiteAnalytics, you must set up SuiteAnalytics Connect in your NetSuite account:
-
Enable the Connect Service feature.
-
Ensure that your Account Administrator has enabled your Account and Role with the Connect Service feature.
-
Navigate to Setup > Company > Enable Features.
-
Click the Analytics tab and check the SuiteAnalytics Connect box.
-
-
Add the SuiteAnalytics Connect permission to an existing Role.
-
Navigate to Setup > Users/Roles > User Management > Manage Roles.
-
Click Customize next to the name of the role for which you would like to add the SuiteAnalytics Connect permission.
-
Click the Setup tab under the Permissions tab.
-
Add the SuiteAnalytics Connect permission.
-
Click Add and Save.
-
-
Verify the Suite Analytics Connect permissions.
-
Find the Settings portlet on your home page and click Set Up SuiteAnalytics Connect.
-
Click Your Configuration to view your service host and account ID information. These settings map directly to Server and Account ID connection properties.
-
Add the NetSuite SuiteAnalytics Connector
To enable Sync to use data from NetSuite SuiteAnalytics, you first must add the connector, as follows:
-
Open the Connections page of the Sync dashboard.
-
Click Add Connection to open the Select Connectors page.
-
Click the Sources tab and locate the NetSuite SuiteAnalytics row.
-
Click the Configure Connection icon at the end of that row to open the New Connection page. If the Configure Connection icon is not available, click the Download Connector icon to install the NetSuite SuiteAnalytics connector. For more information about installing new connectors, see the Connections section in the Help documentation.
Authenticate to NetSuite SuiteAnalytics
After you add the connector, you need to set the required properties.
-
Connection Name - Enter a connection name of your choice.
-
Server - Enter the value of Service Host you previously found.
-
Account Id - Enter the value of Account Id you previously found.
-
Role Id - Enter the Role ID you previously updated.
-
User - Enter the username that you use to authenticate to your NetSuite account.
-
Password - Enter the password associated with that account.
Configure Replication Queries
Sync enables you to control replication with standard SQL. The REPLICATE statement is a high-level command that caches and maintains a table in your database. You can define any SELECT query supported by the NetSuite SuiteAnalytics API. The statement below caches and incrementally updates a table of NetSuite SuiteAnalytics data:
REPLICATE Account;
You can specify a file containing the replication queries. This enables you to use the same replication queries to replicate to several databases.
Run Sync
After you have configured the connection strings and replication queries, you can run Sync with the following command-line options:
Windows
SuiteAnalyticsSync.exe -g MySQLiteConfig.xml -f SuiteAnalyticsSync.sql
Java
java -Xbootclasspath/p:c:\sqlitejdbc.jar -jar SuiteAnalyticsSync.jar -g MySQLiteConfig.xml -f SuiteAnalyticsSync.sql