vmware-archive / sql_magic

Magic functions for using Jupyter Notebook with Apache Spark and a variety of SQL databases.
Apache License 2.0
172 stars 21 forks source link

`table_name` suggestion #1

Open cfperez opened 7 years ago

cfperez commented 7 years ago

This is awesome! I've hacked together both ipython-sql and background cell execution in the notebook before. This is more elegant than both. Thanks for doing this.

Looking at the source, I was confused by the table_name variable's meaning. I think I understand that it is actually the name of the variable that the result will be pushed to.

Because of the (SQL/RDBMS) context, I think a better name is user_variable.

What do you think? Happy to PR.

crawles commented 7 years ago

Glad you are enjoying it! Good catch.

I would prefer a name like df_result_name because user_variable could be confused with the user supplied variables to the query using the string formatting {} syntax.

cfperez commented 7 years ago

Good point, even better!