Macros

Macros can be used with commands and job schedules on QDS.

Macros can be accessed or defined using the Javascript language. Only assignment statements are valid. Loops, function definitions, and all other language constructs are not supported. Assignment statements can use all operators and functions defined for the objects used in the statements. Defined macros can be used in subsequent statements.

Javascript Language and Modules

The following Javascript libraries are available.

Library Description Link to Documentation
Moment.js Provides many date/time related functions. Ensure that the moment.js timezone functionality matches with the timezone used by the scheduler. Qubole uses Moment JS version 2.6.0. Moment.js
Moment-tokens Provides strftime formats Moment-tokens

Macros in Scheduler

Macros in Scheduler describes in detail about the macros in scheduler.

Macros in QDS UI

Currently Qubole supports macros for creating jobs/schedules on the Scheduler page. For more details, see Creating a New Schedule.