# Big-Query-Magic
#### The package has been created for Mac OS
#### Requirements
It is assumed that you have basic packages like pandas installed
Install Auth2client and pandas_gbq
Ensure that you can query data using pandas gbq
<hr>
This packacge installs a magic in your startup directory which makes querying in jupyter environment more user friendly and easier to use.Post intallation simply type %%BQSQL and write your query
example
```python
%%BQSQL
SELECT *
FROM table
LIMIT 10;
```
<b>There are other features also present which makes it even more user friendly which can be explained with help of the argument this magic can take</b>
-job [Y or None] If Y is passed as job argument this will run just the query but will not pull the out put, this is useful when one is creating a large temp table during the workflow and does not want to download and load it in python, the existing pandas_gbq does not offer that
-save_to [Table Name] Pass a variable in which the output needs to be store
Note Do not pass both the arguments at the same time
-para [Y or None] If Y is passed the query will look if parameters or python variables are used in the query. Yes this is one of the best features of this magic you can use python variables directly in your query
example
```python
x = ['user1','user2']
%%BQSQL -para Y -job Y
SELECT *
FROM table
WHERE user_id IN @x
```
Currently string int and list of these two can be passed as a parameter. Note parameter needs to be preceeded by <b><u>@</u></b> in case one was planning to use @ just as character in that case please avaoid using parameter
程序员Chino的日记
- 粉丝: 3726
- 资源: 5万+
最新资源
- 基于Springboot+Vue疫情打卡健康评测系统-毕业源码案例设计(源码+项目说明+演示视频).zip
- 基于Springboot+Vue校园失物招领系统-毕业源码案例设计(高分毕业设计).zip
- 北京市各项指标.xlsx
- 基于Springboot+Vue新冠病毒密接者跟踪系统-毕业源码案例设计(高分项目).zip
- 机械设计电池焊脚检测设备sw18可编辑非常好的设计图纸100%好用.zip
- 基于Springboot+Vue校园疫情防控系统-毕业源码案例设计(源码+论文).zip
- 基于Springboot+Vue新闻稿件管理系统-毕业源码案例设计(高分毕业设计).zip
- 基于Springboot+Vue新闻资讯系统-毕业源码案例设计(95分以上).zip
- 基于Springboot+Vue学科竞赛报名管理系统毕业源码案例设计(源码+数据库).zip
- 基于Springboot+Vue学生评奖评优管理系统-毕业源码案例设计(高分毕业设计).zip
- Comsol冻土路基水热力源文件 该文件建立了路基水热耦合计算控制方程, 利用COMSOL 软件二次开发实现了路基冻胀融沉问题的水热耦合计算 本案例建立成二维模型,物理场采用两个PDE模块和固体力学
- 基于Springboot+Vue学生宿舍管理系统毕业源码案例设计(源码+论文).zip
- 基于Springboot+Vue学生网上请假系统设计与实现-毕业源码案例设计(源码+项目说明+演示视频).zip
- 基于Springboot+Vue学生宿舍信息系统-毕业源码案例设计(高分毕业设计).zip
- 基于Springboot+Vue学生选课系统-毕业源码案例设计(95分以上).zip
- GPT-SoVITS-WebUI
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈