Answers for "PBI TO SQL"

SQL
0

PBI TO SQL

#hide_output
import sqlalchemy


from sqlalchemy import create_engine, MetaData, Table, select


from six.moves import urllib


params = \

    urllib.parse.quote_plus('DRIVER=ODBC Driver 17 for SQL Server;SERVER=localhost;DATABASE=pbi;trusted_connection=yes'

                            )



engine = sqlalchemy.create_engine('mssql+pyodbc:///?odbc_connect=%s'

                                  % params, echo=False)


connection = engine.raw_connection()


dataset.to_sql(name='from_pbi2', con=engine, index=False,

               if_exists='append') // or 'replace'
Posted by: Guest on May-04-2022

Code answers related to "SQL"

Browse Popular Code Answers by Language