Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to read a sql table using python in pipeline?
#1
Paste below script in meta information script section.

Provide required credentials.

import pandas as pd

from sqlalchemy import create_engine
def read_data():
   engine = create_engine('mysql://root:root@localhost/db')
                       #dbsystem://username:password@host/db
   df = pd.read_sql('SELECT * from table_name', con=engine)
   return df 
 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)