My mistake, the tutorial was working. It was writing to the "master" database instead of the new database created. Thank you.
Python SQL Server Example Issue
I have walked through the Microsoft documentation for python integration with SQL Server using pyodbc and revoscalepy:
I have run all steps successfully until 5-3 (using revoscalepy to create table and load Iris data). I am able to create a database using pyodbc as demonstrated in 5-1, but in 5-3, code runs without error, it signifies the appropriate amount of rows successfully read and written, but no table appears in SQL Server.
Has anyone else successfully walked through this tutorial?
Thank you.
from revoscalepy import RxSqlServerData, rx_data_step
Example of using RX APIs to load data into SQL table. You can also do this with pyodbc
table_ref = RxSqlServerData(connection_string=connection_string.format(new_db_name), table="iris_data")
rx_data_step(input_data = df, output_file = table_ref, overwrite = True)
print("New Table Created: Iris")
print("Sklearn Iris sample loaded into Iris table")
1 additional answer
Sort by: Most helpful
-
ddthal 96 Reputation points
2021-08-12T14:53:56.76+00:00 SQL Server Version 15.0.18206.0
Python Version 3.5.2