Forums

Full Version: How to read a sql table using python in pipeline?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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