1

I am a data scientist and do not have any prior background in SAP.

I need to pull data (query and Qube) from SAP ERP to python for some predictions and automate the process. but I am not able to find the right answer to this. our SAP ERP runs on the Oracle database but I don't have access to pull data directly from oracle, also we have SAP BW. Please help

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
maryam_k
  • 126
  • 1
  • 7
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Apr 20 '22 at 12:30

2 Answers2

1

You can start with tutorials like this one. After that you can ask more specific question when you get stuck.

Hrvoje
  • 13,566
  • 7
  • 90
  • 104
1

You can get data using various ways, or using different Data Ingestion tools. It would also depend upon multiple factors but naming a few

  • On-premise or Cloud(AWS, Azure, GCP)
  • Whether you want to get data only once or on daily basis.

I am assuming you want to get data only once and your DB connectivity is working fine. Install these, if they are not

pip install pandas
pip install SQLAlchemy
pip install cx_Oracle

In your python notebook or IDE

import pandas as pd
import cx_Oracle
import sqlalchemy

Add appropriate values of (user, password, hostIP:Port , service_name) in engine.

engine = sqlalchemy.create_engine("oracle+cx_oracle://user:password@hostIP:port/service_name=DB_name", arraysize=1000)
SQL_query = """SELECT* from table"""
df = pd.read_sql(SQL_query, engine)
  • I want the data on a daily basis, and I do not have query access to the database, I can only access the data via sap – maryam_k Apr 21 '22 at 03:13