Connecting Tally For Data Visualization On Nioviz

Connecting Tally For Data Visualization On Nioviz

NioViz can connect to any SQL based datasource through SQLAlchemy, including modern cloud native databases and engines at petabyte scale.

Here is How we can Configure and use Tally Data on Superset for Data Visualization !

To query a SQL speaking database, Superset requires:

  • a SQLAlchemy dialect + a companion Python DB-API 2 library to enable basic functionality
  • some database-specific connector code to enable all features

In Short, an SQL Alchemy URI can be added to connect a database which is not listed here to connect to Superset for Data Vizualization.

SQLAlchemy is one of the most popular object-relational mapper (or ORM for short)  out there and it’s written in Python. The Format For SqlAlchemy URI is :



{SQL Alchemy Connection Type}://{Username}:{Password}@{URL}?{Options}

To Obtain the values for this string and also how to connect tally off-premises data online to our server and visualize it in dashboard, we need to follow the following steps-

Requirements Or prerequisite

Download and Installation Requirements For Windows:- 

  1. Superset
  1. CData Tally Python Connector

  1. Jupyter Notebook

  1. Ngrok

  1. Tally Prime

  1. ODBC Driver

  1. SQL Alchemy

we can make data connectors with the help of installing CData , ODBC Driver and Jupyter Notebook for python codes to be written in it. and do few settings in tally.

Setting Tally

Open Tally Prime and set Client/Server Configration , tab under Exchange, as 

Tally  prime act as “Both”

Enable ODBC “Yes”

Port “9000”

Configuring Data Connector

After Everything Installed we Can write Python code in Jupyter Notebook for Data Connector

Steps and  Python Codes use to connect Tally Data using SQL Alchemy Query Process.


  • Install The Requirements
  • Import / Call them
  • Create Engine in SQL Alchemy
  • Give Connection String to the Engine
  • Declare a Mapping Class for tally data
  • Query Tally Data

  • Use the piputility to install the SQLAlchemy toolkit:

pip install sqlalchemy

  • Be sure to import the module with the following:   

import sqlalchemy

  • You can now connect with a connection string. Use the create_enginefunction to create an Engine for working with Tally data.

engine = create_engine(“tally:///?Url=’http://localhost:9000′”)

  • After establishing the connection, declare a mapping class for the table you wish to model in the ORM (in this article, we will model the Company table). Use the sqlalchemy.ext.declarative.declarative_base function and create a new class with some or all of the fields (columns) defined.

base = declarative_base()

class Company(base):

__tablename__ = “Company”

Name = Column(String,primary_key=True)

Address = Column(String)

  • With the mapping class prepared, you can use a session object to query the data source. After binding the Engine to the session, provide the mapping class to the session query method.

engine = create_engine(“tally:///?Url=’http://localhost:9000′”)

factory = sessionmaker(bind=engine)

session = factory()

for instance in session.query(Company).filter_by(CompanyNumber=“1000”):

print(“Name: “, instance.Name)

print(“Address: “, instance.Address)


Here You Can See the Output as the Data you queried about from Tally.

Connecting Tally Data On Server

ngrok Secure Tunnels

Ngrox helps us for Instant access to any system without network pain.
No dynamic DNS, no port forwarding, no VPNs. Put localhost on the internet securely.

 Now, We Can Create a URL /  Temporary Public IP Address to use this data at Cloud,  through Ngrok.

Syntax –

ngrok http 80 –oauth=github –oauth-scope=repo

Run Cmd and then run Code for tally:

Ngrok http 9000

Use url obtained after Forward (Example) :

the whole world can access this URL, it will Keep Changing every time we use ngrok for Non Paid users.Ngrox

SQL Alchemy URI for Tally in Nioviz

Now SQL Alchemy URI for Tally Database in Superset,  would look as follows,


You can test whether the URL is spelled correctly by clicking Test connection in case of any issues like wrong password or inaccurate privileges. If everything is OK,  You will See a Pop Up at Right Bottom for Successful Database Connection Set with Superset. And you will able to Visualize  Your Tally Data.

Coding Overview

NioViz  BI Tool by Niograph supplements Apache Superset potential with additional components, professional services and simple installation scripts that can be deployed at the required scale. 

As NioViz is based on Superset, and is an open source data visualization tool that allows users to create interactive dashboards to visualize live data. It also have capabilities to build and use data connectors for the various data source by using SQL Alchemy  and Python.

For More Professional Services On Data Visualization Contact Niograph

No Comments

Post a Comment