DAY 13 - Import data dynamically from Oracle DB using Python script in Power BI Desktop Step 1 : Python IDLE & Power BI need to be installed in your system Step 2: Execute the below script independetly in Python IDLE and make sure it's getting executed successfully. import cx_Oracle import pandas as pd connection = None try: #Oracle DB Connection Details username = 'p_user_name' password = 'p_password' dsn = 'hostname:port_number/service_name' connection = cx_Oracle.connect( username, password, dsn) # show the version of the Oracle Database #print(connection.version) cur = connection.cursor() cur.execute("select * from oe_order_headers_all where rownum <=10") #fetching 10 records from Order Header Table ...
Comments
Post a Comment