0

Python for Report Generation !?

Hi, Can we use python language to connect to a database and run some queries by passing parameters and generate a HTML report from the output of those?? Or Any other Language this can be achieved.

18th Sep 2018, 5:04 AM
Sundar KM
Sundar KM - avatar
6 Respuestas
+ 2
Wow. So many things going on here. Let's break this down a little. Short and literal answer: Yes. What kind of data is in your database? If it's tabular data, consider SQL > PHP > HTML. You can also go SQL > Python > HTML. If it's data that is best represented in a non-tabular model, you may have to research which language deals with that model best. The umbrella term for those is NoSQL (perhaps they were feeling unimaginative or particularly rebellious that day). Why would you like the output to be in HTML?
18th Sep 2018, 6:17 AM
Janning⭐
Janning⭐ - avatar
+ 2
Well, there's nothing wrong with outputting in HTML (it's just one of many many many markup languages available), but it's hard to suggest a better alternative when I'm not really understanding "why" it was chosen when there's just a lot of "what" being offered. I'm not intimately familiar with SAP HANA, but as an ERP software, I would imagine (wild guess) that you have some part of the organization that would benefit from web-based deployment. A little research on Wikipedia seems to confirm this ( https://en.m.wikipedia.org/wiki/SAP_HANA#Application_Development ). 'The "XS Advanced Engine" (XSA) natively supports Node.js and JavaEE languages and runtimes. XSA is based on Cloud Foundry architecture and thus supports the notion of “Bring Your Own Language”, [...] as well as deploying applications as microservices. XSA also supports server-side JavaScript(XSJS).' Since it already supports Node.js and JavaEE, probably fine to go with one of those. As non-developers, PHP and Python are both easier to understand
19th Sep 2018, 1:45 AM
Janning⭐
Janning⭐ - avatar
+ 1
You're welcome. 🙂 Python is probably fine for bridging the gap between SQL and the front-end for the types of queries you described. PHP is good for collecting information from web forms, but it seems like your data may consist of broader types. If you run into technical issues, I'm sure that SAP HANA must have contact information for support. If you have specific lines of code you'd like us to look at, please feel free to start a new thread with each inquiry to maximize the chance someone will look at it in case they can get to it before me. Keep in mind that the SQL ones will be tougher because we won't be able to look at the content of the tables. 🙂 Best of luck!
24th Sep 2018, 7:07 PM
Janning⭐
Janning⭐ - avatar
0
its rdbms tabular data, from oracle and sap hana db. if not html what else would you suggest for representing the output in a nice way. please suggest !
19th Sep 2018, 12:32 AM
Sundar KM
Sundar KM - avatar
0
or same thing in a different way, Janning⭐ please suggest- Need to run multiple queries based on the provided input to the script passed to the queries (Mostly begin and end Timestamp as input) in where clause of the sql and collect these outputs and store in a file and present as a report.. !? What would be the best way to achieve (FYI, we are dba’s not developers) please suggest Thanks in Adv
19th Sep 2018, 12:41 AM
Sundar KM
Sundar KM - avatar
0
thanks for the information, please help to code sql output to html file
24th Sep 2018, 6:35 PM
Sundar KM
Sundar KM - avatar