Spent 2 days troubleshooting the issue and went down to the module details.
I found the table write function is not working under ignition, but working using python 3.x.
Not sure whether it's the issue with Jython2.7.
Anyway, instead of troubleshooting it further, I went alternative way, to call the external python 3 to run the script instead.
Issue resolved.
Here's the link for calling python3 from ignition.