以下脚本运行良好是小样本
EXECUTE sp_execute_external_script
@language = N'Python',
@script = N'
print(df_training["flResp"].value_counts())',
@input_data_1 = N'SELECT * FROM tb_training_teste',
@input_data_1_name = N'df_training';
我测试了8419条记录,结果还可以,如下:
Mensagem(ns) STDOUT do script externo:
0 4964
1 3452
9 3
Name: flResp, dtype: int64
但是,我的原始表有超过 500,000 条记录,由于以下错误,我无法运行。有人可以帮助找出问题所在吗?以及如何解决?
Error in execution. Check the output for more information.
MemoryError
SqlSatelliteCall error: Error in execution. Check the output for more information.
Mensagem(ns) STDOUT do script externo:
SqlSatelliteCall function failed. Please see the console output for more information.
Traceback (most recent call last):
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 587, in rx_sql_satellite_call
rx_native_call("SqlSatelliteCall", params)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 358, in rx_native_call
ret = px_call(functionname, params)
RuntimeError: revoscalepy function failed.