Skip to content

Instantly share code, notes, and snippets.

@kyogesh
Created August 28, 2015 09:37
Show Gist options
  • Save kyogesh/8b180c554f80ec387917 to your computer and use it in GitHub Desktop.
Save kyogesh/8b180c554f80ec387917 to your computer and use it in GitHub Desktop.
{
"error": "Error in model.predict function\nError in value[[3L]](cond): [ERROR] Service failed: Error in postgresqlExecStatement(conn, statement, ...): RS-DBI driver: (could not Retrieve the result : ERROR: relation \"pdapi_mv_std_course_term\" does not exist\nLINE 1: SELECT * FROM (SELECT * FROM pdapi_mv_std_course_term) AS \"_...\n ^\n)\n\n\nmodel.predict <- function (params) \n{\n flog.info(\"Executing request: %s, %s\", params$request_type, \n params$institution_id)\n con <- max_con_src_postgres(host = cf$dbhost, user = cf$dbuser, \n password = cf$dbpassword, dbname = cf$dbname)\n dbGetQuery(con$con, sprintf(\"SET search_path TO %s\", params$institution_id))\n tryCatch(switch(params$request_type, grades = serv_grades(params, \n con), credit_buckets = serv_credit_buckets(params, con), \n student_groups = serv_stu_groups(params, con), courses = serv_courses(params, \n con), majors = serv_major(params, con), term_list = serv_term_list(params, \n con), majors_list = serv_majors_list(params, con), \n course_list = serv_course_list(params, con), grade_map = stop(flog.error(\"request type *grade_map* not implemented\")), \n major_map = stop(flog.error(\"request type *major_map* not implemented\")), \n stop(flog.error(\"unknown request type not implemented\"))), \n error = function(e) {\n dbDisconnect(con$con)\n stop(flog.error(\"Service failed: %s\", as.character(e)))\n }, finally = {\n dbDisconnect(con$con)\n flog.info(\"Completed request: %s, %s\", params$request_type, \n params$institution_id)\n })\n}",
"yhat_id": "33b06274-e310-425b-abdf-cf9db4a4a9c1",
"yhat_model": "pdapi",
"version": "90b92ec"
}
@kyogesh
Copy link
Author

kyogesh commented Aug 28, 2015

request dict: {
'institution_id': '9990',
'course_cd': ['ENGL1101'],
'request_type': 'grades',
'chart_type': 'grad_rate_by_grade'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment