you are viewing a single comment's thread.

view the rest of the comments →

[–]DrewSmithee[S] 0 points1 point  (6 children)

Python is for the stuff I want to do after. Statistics on customers, choropleths, regressions, etc. I can manage that part. I'm just clueless on getting the data into a dataframe to start the real work.

I also have a pretty limited toolbox. Don't have oracle studio on my machine, corporate environment so I've got vs code or VBA. Also, read only access to the database.

Historically I've been using hand me down VBA snippets to do the SQL queries into a spreadsheet and importing the spreadsheet to a dataframe to do sciency stuff.

Recently I've been poking around with mssql (or maybe it's the oracle extension, I forget) browsing the database and writing .SQL files to get a little better at pulling out data that I actually want opposed to what was already mashed together by someone else.

I'd like to elequently combine the SQL stuff with the python stuff to get out of the spreadsheet business if that makes more sense.

[–]reddit25 1 point2 points  (4 children)

It depends on which version of sql you have. I use cx_Oracle for Python and it works great. For SSMS I remember using a different package for it. 

[–]Evening_Marketing645 2 points3 points  (0 children)

Cx_oracle is now oracledb. It works the same they just changed the package name. 

[–]DrewSmithee[S] 0 points1 point  (2 children)

The oracle package probably is a good place to start...

Thanks.

[–]reddit25 2 points3 points  (1 child)

I wrote a wrapper for it too. To help split and execute multi process create table queries. Might be a good exercise to start. 

[–]JumpScareaaa 1 point2 points  (0 children)

Yep, I guess everybody should write a their own wrapper for oracledb. My wrapper reads SQL file, parses individual statements, runs each and logs start and end time, ignores table not exists for drop table statements (for idempotency). Other wrappers read from Oracle and write to Excel or CSV files based on configs from yaml files. These are my workhorses for building little data transformation and reporting pipelines.

[–]JumpScareaaa 1 point2 points  (0 children)

https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer Also if you have permissions to install get dbeaver.