108
submitted 2 years ago* (last edited 2 years ago) by RNAi@hexbear.net to c/chapotraphouse@hexbear.net

What's next? Want me to give presentations in fucking Prezi? Start running I'll kill you with a rock

you are viewing a single comment's thread
view the rest of the comments
[-] hexaflexagonbear@hexbear.net 12 points 2 years ago

Yeah, my resume right now is Python + SQL (does everything for my job) and a dozen pieces of expensive software that my boss insists we must make use of.

[-] driving_crooner@lemmy.eco.br 7 points 2 years ago

Im starting to use python in everything I can and got to finally get the Python SQL connection work, unfortunately can't get it to work in a jupyter notebook or in an interactive python, so I have to run the scripts, wait 10 minutes and then fix any error or do another step on the process. Funnily enough, is importing the pandas library the bottleneck of the process, the SQL queries are somehow fast in comparison.

[-] hexaflexagonbear@hexbear.net 4 points 2 years ago

I can't help much on the sql connector end (they're black magic and I'm grateful to the sql gods every time they work). But I have a couple of small tips, one if you have CRUD access on the sql server, it's useful to make a small table to use as a way to debug the import script quicker, if no crud access then using top or limit in your sql query would do the trick. Another thing, you may already be doing this, but in your script where you pull data from sql it's generally better to write to a parquet file rather than something like csv. It preserves the pandas dataframe structure which can be slow to cteate.

Also, you can definitely get sql connectors to work in a jupyter notebook, but probably not worth the effort. It's not like on the data pull stage you're doing any exploratory work anyway.

[-] driving_crooner@lemmy.eco.br 3 points 2 years ago

The problem really is that the SQL server doesn't accept connections from my pc, so I had the IT guys install an embedded version of Python in a server that could connect to the SQL server, then from VS code im selecting that Python as the kernel, it's only work as scripting because everytime I run it it use that external Python to run the script in a terminal. On the other hand, the SQL scripts I run them on some Microsoft sql server application, and the Python I just wanted it to do different queries and then process the queries with pandas and export them formatted on excel or wharever.

this post was submitted on 31 Dec 2023
108 points (100.0% liked)

chapotraphouse

13919 readers
914 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Slop posts go in c/slop. Don't post low-hanging fruit here.

founded 4 years ago
MODERATORS