12-21-2022, 05:27 AM
Use python script component.
Paste below script in meta information script section.
Provide connection credentials.
import pandas as pd
from sqlalchemy import create_engine
def sql_write(data):
# Connect to the database
engine = create_engine('mysql+pymysql://user:password@host/database')
# Store the data in the database
data.to_sql('table_name', engine, if_exists='replace')
Paste below script in meta information script section.
Provide connection credentials.
import pandas as pd
from sqlalchemy import create_engine
def sql_write(data):
# Connect to the database
engine = create_engine('mysql+pymysql://user:password@host/database')
# Store the data in the database
data.to_sql('table_name', engine, if_exists='replace')