UNPKG

@sasjs/cli

Version:

Command line interface for SASjs

24 lines (23 loc) 2.01 kB
import SASjs from '@sasjs/adapter/node'; import { Target, AuthConfig } from '@sasjs/utils'; /** * Triggers existing job for execution on Viya server. * @param {object} sasjs - configuration object of SAS adapter. * @param {string} accessToken - an access token for an authorized user. * @param {string} jobPath - location of the job on SAS Drive. * @param {object} target - SAS server configuration. * @param {boolean} waitForJob - flag indicating if CLI should wait for job completion. * @param {boolean | string} output - flag indicating if CLI should print out job output. If string was provided, it will be treated as file path to store output. If filepath wasn't provided, output.json file will be created in current folder. * @param {string | undefined} logFile - flag indicating if CLI should fetch and save log to provided file path. If filepath wasn't provided, {job}.log file will be created in current folder. * @param {string | undefined} statusFile - flag indicating if CLI should fetch and save status to the local file. If filepath wasn't provided, it will only print on console. * @param {boolean} ignoreWarnings - flag indicating if CLI should return status '0', when the job state is warning. * @param {string | undefined} source - an optional path to a JSON file containing macro variables. * @param {boolean} streamLog - a flag indicating if the logs should be streamed to the supplied log path during job execution. This is useful for getting feedback on long running jobs. */ export declare function executeJobViya(sasjs: SASjs, authConfig: AuthConfig, jobPath: string, target: Target, waitForJob: boolean, output: string | boolean, logFile: string | undefined, statusFile: string | undefined, ignoreWarnings: boolean, source: string | undefined, streamLog: boolean): Promise<any>; /** * Gets job execution context name. * @param target - SAS server configuration. * @returns - job execution context name. */ export declare function getContextName(target: Target): string;