Skip to main content

Pyplatform-database package provides read and write functions for Microsoft SQL database.

Project description

Pyplatform-database package provides read and write functions for Microsoft SQL database.

Installation

pip install pyplatform-database

Authentication and environment variables

Refer to main page for documentation on authentication

Exploring the modules

from pyplatform.database import *
show_me()

Usage

reading from SQL table, default database provided in credential file

from pyplatform.database import *
query = """SELECT * FROM dbo.fact_sample_superstore"""
df = az_to_df(query)
df.head()

writing pandas dataframe to sql table with non default setting

from pyplatform.database import *
# df #TODO create dataframe as source
table_name = 'dbo.fact_sample_superstore'
engine = azure_sql_engine(database='testDB')  #changing database only
df_to_azure_sql(df,table_name, engine=engine)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyplatform-database-2020.12.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

pyplatform_database-2020.12.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page