hana

python sql table with paramter to json

python sql table with paramter to json Question: Good Day! I am trying to conver sql query into json with python, but getting an error when try to use sql query with a paramater: sql syntax error: incorrect syntax near "%" it works ok without setting paramater My db is hana and module is hdbcli …

Total answers: 1

How to Establish Python Connection with HANA using OAUTH/JWT

How to Establish Python Connection with HANA using OAUTH/JWT Question: We are currently using basic authentication in our python connectors to SAP HANA. In our current connection string, we use SQLAlchemy and it looks something like this: def get_engine(host_name): return create_engine(‘hana://{user}:{password}@{host_name}:{port}/HUP’.format( user=request.json[‘username’], password=base64.b64decode(bytes(request.json[‘password’], encoding=’utf-8′)).decode(‘utf-8’), host_name=host_name, port=current_app.config[‘HANA_PORT’] ) ) We now need to transition into using …

Total answers: 1

Syntax error while loading data from SAP Hana with Python

Syntax error while loading data from SAP Hana with Python Question: I have an issue loading data from SAP HANA via Python. The code works fine when it is like: connection = pyhdb.connect(|||credentials|||) cursor = connection.cursor() cursor.execute(‘SELECT "0COMP_CODE", "0VENDOR", "0REF_DOC_NO", "0BBP_INV_ID" FROM "_SYS_BIC"."system-local.bw.bw2hana/ZFGL01MY" WHERE CAST( "0PSTNG_DATE" AS date) >= ADD_MONTHS( NEXT_DAY( LAST_DAY( CURRENT_DATE)), -2) and …

Total answers: 1

Executemany() SQL-Update Statement with variables for column names

Executemany() SQL-Update Statement with variables for column names Question: I am really struggling with updating many rows in python using SAP HANA as my database and PyHDB for establishing the interface between both applications. Its working when I "hardcode" the columns, but I need to dynamically switch the columns by defining them inside of an …

Total answers: 1