update: SqlGuardViolation info
This commit is contained in:
@@ -36,7 +36,7 @@ def generate_job_file(code: str) -> dict[str, str]:
|
|||||||
f"PySpark code violates SQL safety policy. "
|
f"PySpark code violates SQL safety policy. "
|
||||||
f"Only SELECT and INSERT statements are allowed. "
|
f"Only SELECT and INSERT statements are allowed. "
|
||||||
f"Found forbidden statement(s): {offenses}. "
|
f"Found forbidden statement(s): {offenses}. "
|
||||||
f"Rewrite the code to use only SELECT/INSERT (or DataFrame DSL)."
|
f"Rewrite the code to use only SELECT/INSERT."
|
||||||
)
|
)
|
||||||
path = write_job_file(code)
|
path = write_job_file(code)
|
||||||
logger.info(f"generate_job_file ok script_path={path}")
|
logger.info(f"generate_job_file ok script_path={path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user