How to query data from SingleStore into Statistica /Statistica Enterprise and write back to SingleStore by using Singlestore ODBC driver?

How to query data from SingleStore into Statistica /Statistica Enterprise and write back to SingleStore by using Singlestore ODBC driver?

book

Article ID: KB0071237

calendar_today

Updated On:

Products Versions
Spotfire Data Science - Workbench TIBCO Statistica 14.0.1 and above, 1.3 and higher, 1.3 and higher

Description

PREREQUISITES: 

1. Details to connect to SingleStore Database - SinglestoreEndpoint, Port, and Credentials
2. Download and install the SingleStoreODBC64-1.1.3 or higher OR Download and install the MySQLODBCConnector-8.1.0 

NOTE: SingleStore ODBC Driver can be configured with OLE DB as well as ADO.NET Database connection from Statistica Enterprise, while MySQL ODBC Driver can be configured with ADO.NET Database connection from Statistica Enterprise.

Issue/Introduction

This article contains the steps to configure a DSN with the SingleStore ODBC driver for Windows and use the DSN information in Statistica Enterprise to configure a database connection.

Environment

OS: Windows

Resolution

1.  Create a 64-bit DSN using the Single store driver (Control Panel>>Administrative Tools>>ODBC Data Sources (64-bit)):
User-added image

2. Configure the DSN information:
User-added image

3. Also add additional information:
User-added image


2.  Create a Data Connection in Statistica Enterprise using OLE DB 
2a.  Right-click on "Database Connections", select "New OLE DB Database Connection", and then select "Microsoft OLE DB Provider for ODBC Drivers":
User-added image

2b.  Configure the connection information and click OK:
User-added image

2c.  Name the database connection and click "Commit" and  Select the access permissions:
User-added image


PULL Data from SIngleStore to Statistica

1. Create a workspace and pull the data from the enterprise data configuration created in the above steps
It will be pulled through Data Configuration node:

User-added image

2. Check the cog wheel on the Node and Run it. This will generate the spreadsheet to hold the data pulled from SingleStore:
User-added image


An example using the OLE DB Database Connection with the "Write Spreadsheet to Database" node

1.  Create a workspace with data to write to the database using the Write Spreadsheet to Database node

Go to Home>>New>>Workspace.  Select "Data Source">>Files (or use Enterprise Data... see Setting Up a Data Configuration) and  Add the "Write Spreadsheet to Database" node and link it to the spreadsheet. Populate the other fields ("Drop and recreate", "Append", and "Truncate and insert" work as expected) and run the node:


User-added image

2. Verify if the data is being written at the SingleStore Endpoint:
User-added image
 

 

Additional Information

https://docs.tibco.com/pub/stat/14.1.0/doc/html/UserGuide/Default.htm#user-guide/write-spreadsheet-to-database-configuration.htm

https://github.com/memsql/singlestore-odbc-connector/releases/tag/v1.1.3