I am trying to read data from ODATA and later on create dataframes using python.
import requests import pyodata import json import pandas as pd
When using pyodata
Method 1
SERVICE_URL = 'https://xxx/sap/opu/odata/sap/Table_0001'
or
SERVICE_URL = 'https://xxx/opu/odata/Table_0001/?$format=json'
HTTP_LIB=requests.Session()
HTTP_LIB.auth = ('username', 'password')
HTTP_LIB.verify=False
I have the following issue:
<<bound method Service.http_get_odata of <pyodata.v2.service.Service object at 0x000001B491BD58D0>>
when using requests only Method 2
import pyodata
import requests
import json
r=requests.get('https://xxx/opu/odata/Table_0001/?$format=json', auth=('Username', 'Password'), verify=False)
print(r.status_code)
print(r.json())
I am connected to ODATA but i cant select the the data from table and i have the following output
{'d': {'EntitySets': ['Table_0001', 'AdditionalMetadata']}}
I tried loading ODATA in excel and it is working.