Column meta-data in MySQL Shell with Python mode

Meta-data is important to SQL DBA’s and Developers, likely for different reasons. There are all sorts of ways to access meta-data. The powerful MySQL Shell in Python mode is no exception. What if you need the column meta-data on a result set? You can use the get_columns() method and obtain useful meta-data information about it (the result set). All in Python mode. Continue reading to see examples…

[Keep reading for more MySQL database and Python/PHP-centric content >>>]

Use Regular Expressions to gain insight on Content Grouping

Today’s post is a special one and a first-timer here on Digital Owl’s Prose. I am featuring a guest post by Edoardo Frasca.

Let’s meet Edoardo in his own words…

“Hey, I’m Edoardo!
I’m an Italian digital marketing enthusiast living in London.
My professional focus is on marketing, web analytics and data analysis.

After graduating at the School of Management and Economics in Turin (IT), I had to face what a lot of other graduates face: INEXPERIENCE when transitioning from university to work 🙂
That’s why I decided to share a few tips and tricks around highly requested tools like, in this case, Google Analytics.

  • What is working well or not working at all on your website?
  • Which category of products is gaining traction?
  • Are the blog posts just published gaining interest?

I hope you’ll be able to answer some of those questions after reading this blog post, unlock the power of content grouping in Google Analytics!”

Now without any further delay, let’s enjoy Edoardo’s post, Advanced Content Grouping with Regular Expressions .

Thank you, Edoardo for guest-posting on my blog!

Transaction in MySQL Shell – Python mode with examples

Although my day job has lately been filled primarily with MySQL and PHP development – which I absolutely enjoy – I still make spare time for MySQL and Python hacking; particularly in the MySQL Shell. For whatever reason, I am drawn back to this specific environment. SAVEPOINT, COMMIT, and START TRANSACTION are integral commands for working within a database transaction. MySQL Shell fully supports these commands. We can even execute them in Python mode! Continue reading to see them in action…

[Keep reading for more SQL database and Python-centric content >>>]

CSV to JSON with Python for MySQL upload

Admittedly, I have jumped head-first into the world of JSON within MySQL. I also have a thing for Python, of which I find myself using a lot of in my day job as Pipeline Survey Data Analyst. CSV’s are everywhere: in data at work, on the web, even in my personal life (as you’ll see). Loading CSV data into MySQL is nothing new to anyone working with either of the technologies. As a matter of fact, there are several ways you can get your CSV data into MySQL. I wrote the post, Pyodbc SQL CRUD – Create: Examples with MySQL, you can read where I cover loading CSV data using the Python pyodbc module. But, how about type-casting CSV data – which typically are strings – to a compatible JSON data type? Then push the JSON data to a MySQL JSON column? And that my friends, is the focus of this post. Turns out, Python’s csv and json standard libraries makes the whole process virtually painless. Keep reading and see a simple script I devised…

[Keep reading for more SQL database and Python-centric content >>>]

CREATE TABLE using Python in the MySQL Shell – with examples.

Not only are basic SQL CRUD operations supported in MySQL Shell Python mode, but you can also execute DDL commands such as CREATE TABLE. While there is not a specific create_table() method per se, there is a sql() method for this – and other – types of commands that don’t have an individual method such as those for each of the individual CRUD operations. Keep reading to see a simple example use of the sql() method…

[Keep reading for more SQL database and Python-centric content >>>]