python runner for SAS Enterprise Gide文件
saseg-runner的Python项目详细描述
概述
saseg\u runner让您从python或命令行运行egp文件。在
要求
- 窗口
- python 3.6以后的版本
- SAS企业指南
安装
pip install saseg_runner
使用
python库作为
^{pr2}$如果egp文件中的某些任务失败,'run\eu egp'会引发SASEGRuntimeError的异常!在
fromsaseg_runnerimportrun_egp,SASEGRuntimeErrorrun_egp(egp_path='test_fail.egp',eg_version='7.1',profile_name='Your Profile')# opening SAS Enterprise Guide 7.1# -> application instance created# activating profile:[SAS Asia]# -> profile:[SAS Asia] activated# opening test_fail.egp# -> egp file opened# running test_fail.egp# -> run finished# -> saved to test_fail_20191031-1056.egp# getting logs from test_fail_20191031-1056.egp# -> log created# [task 2] failed in test_fail.egp# ERROR: CLI error occured: [DataDirect][ODBC lib] Specified driver could not be loaded# Traceback (most recent call last):# File "saseg_runner/runner.py", line 123, in <module># run_egp(SCRIPTDIR_PATH.parent.parent / 'test/test_fail.egp')# File "saseg_runner/runner.py", line 103, in run_egp# raise SASEGRuntimeError# __main__.SASEGRuntimeError
参数
- egp_路径:联合[str,path]
- SAS企业指南文件路径。在
- 配置文件名:str
- 要使用的配置文件名称
- 覆盖:bool
- 控制执行后是否保存egp文件。如果为False,则将时间戳添加到文件名中。默认值为False。在
- 删除日志:bool
- 是否删除日志文件。默认值为True。在
- 冗长:布尔
- 默认值为False
从命令行
run_egp <your egp file path>
- 项目
标签: