A package to easily run queries at SQL Server and BigQuery.
Project description
XQuery
A package to easily run queries at SQL Server and BigQuery.
Allows sending queries and receiving data in form of pandas DataFrame from SQL Server and BigQuery.
How to use
SQL SERVER
from xquery import XQuery
server_name = 'ENTER_SERV_NAME'
database_name = 'ENTER_DB_NAME'
sql_xq = XQuery()
sql_xq.set_connection_sql_server(server_name=server_name, database_name=database_name)
df = sql_xq.pull_query('SELECT 1 AS d')
print(df)
sql_xq.session.close_connection()
BIGQUERY
from xquery import XQuery
from src.XQuery.config import BQ_CLIENT_SECRET_FILE # edit path to your file
bq_xq = XQuery()
bq_xq.set_connection_big_query(BQ_CLIENT_SECRET_FILE)
df = bq_xq.pull_query('SELECT 1 AS d')
print(df)
bq_xq.session.close_connection()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xquery-0.0.116.tar.gz
(5.9 kB
view details)
Built Distribution
File details
Details for the file xquery-0.0.116.tar.gz
.
File metadata
- Download URL: xquery-0.0.116.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07c62e15e537f46bc96b2c02dac087d6529749ad57d9a867eb701ea00c7c77a |
|
MD5 | 26b8dca25e5f5b515cda2445c2861799 |
|
BLAKE2b-256 | 1f93f270c56440c88a9c26c159761436a5fb14ac878d2888f60b8ebabf0cdc8a |
File details
Details for the file xquery-0.0.116-py3-none-any.whl
.
File metadata
- Download URL: xquery-0.0.116-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 463be4bfbe176802bd26fe7df9a1522e8e10ab7e82adbd64bd7ce2ecb17eda1b |
|
MD5 | 89f8530558cd142c55360ce1600334e3 |
|
BLAKE2b-256 | 074981bf9f89e75a14eed3439eab8cda1c31b964a9755a78d8861def8eecc31e |