Hello and thank you for taking the time to read this. For days I'm figuring out why I get this error when I try to load Account data towards an mssql database. The connection is fine.

But I keep on getting these errors:

(pyodbc.ProgrammingError) ('Invalid parameter type. param-index=17 param-type=collections.OrderedDict', 'HY105')

Exception: (102, b"Incorrect syntax near 'Id'.DB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\n")

Exception: One or more values in the dataframe have more characters than possible in the database table. The maximum number of characters in each column are:

How can I circumvent these errors and load the data without errors:

I use this for instance:

 engine = sal.create_engine('mssql+pyodbc:///?odbc_connect={}'.format(params))
    conn = engine.connect()


    for entity in ['Account']:

        df = get_salesforce_data(sf=sf, sf_object=entity, method=method)
        df.to_sql(entity, con = engine, if_exists ='append', index = False, chunksize = 1000)

There 94 columns in this Account table?

Thank you for thinking with me

0

There are 0 answers