Skip to main content

Runs a SQL command on SAP HANA Cloud using OAuth single sign on and returns a pandas or polars dataframe

Project description

Usage of the hana_cloud_interface package

This package provides a simple interface to connect to SAP HANA Cloud databases and execute SQL queries. Below are some examples of how to use the package.

example

the main function is very simple It takes a SQL command as a string and returns the data

import hana_cloud_interface as hci

sql_command = """
SELECT top 10
    "data1"
    "data2"
FROM "table1"
"""
    
data = hci.hana_sql(sql_command)

Configuration file

You need specify the location of your configuration file by setting the config_file attribute of the hci module. For example:

hci.config_file = 'location of configuration file'

the configuration file is a .json file

{
    "CLIENT_ID": "",
    "CLIENT_SECRET": "",
    "AUTH_URL": "",
    "TOKEN_URL": "",
    "protected_url": "",
    "REDIRECT_URI": "",
    "SCOPE": "",
	"HC_prod_URL": ""
}

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

hana_cloud_interface-0.1.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hana_cloud_interface-0.1.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file hana_cloud_interface-0.1.5.tar.gz.

File metadata

File hashes

Hashes for hana_cloud_interface-0.1.5.tar.gz
Algorithm Hash digest
SHA256 775e3bb806d994e2c197ea20aad04109963378ff60dd7ef30ba457160e5c196c
MD5 17438723f1c5b0dedbc02c7a8da19a7b
BLAKE2b-256 bc04ac3886eeedb914e45973593fb01baab381315fd3e43270d3eaec0c31feae

See more details on using hashes here.

File details

Details for the file hana_cloud_interface-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for hana_cloud_interface-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45537a7715a7126a00d84988a2f4465274934d6d4d48f32475705fea8552adae
MD5 0ed2bfae5125e0dc913cb75d781e48f4
BLAKE2b-256 e609341bba39ef010eb9d149f20407cfd70301bab9cedd725f07d422433ac55c

See more details on using hashes here.

Supported by

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