Create a Data project with this syntax.


CREATE PROJECT 'project_name'
 [  [ PRESCRIPT | SCRIPT | POSTSCRIPT ] AS { <SQL statement> } ]
 [ OPTIONS (RUN_AS 'Cirro user', SCHEDULE 'cronSchedule', START '<begin date>', FINISH '<end date>', PROPERTIES 'JSON document') ]


  • ‘project_name’ - user specified project name added during CREATE or ALTER PROJECT command. These are unique for all active projects, but not for deactivated projects.

  • ‘id’ - Cirro assigned project ID. Once a project has been created it can be referenced by ID (alter, execute, drop).

  • FROM PROJECT ID id - This clause finds the specified project and copies the project table entry, and create/replace the project_map entries, with the ones from the specified project.

  • SCRIPT PRESCRIPT POSTSCRIPT - any scripts to execute.
  • SQL statement - Any valid SQL statement. Usually this is a BEGIN..END block;

  • RUN_AS

    • sets the run-as user.

    • This defaults to the current user if not specified.

    • If removed, the project will run as the creator.


    • A Quartz-style cron schedule

    • with optional begin (default: now) and end (default: never) dates - This command will populate the projects table and optionally create a Quartz job with the given schedule.

    • If removed, any scheduled job will be deleted

  • START - begin date

  • FINISH - end date

  • PROPERTIES - Optional storage for data management output.

Additional Information

  • An empty string or explicit NULL can be used to remove an option.

  • Both scheduled and manually executed projects log to the project_runs and run_detail tables.

  • Scheduled job information will still be found in sys.cirrojob and cirrosys.jobstatus

  • A scheduled job has one row in sys.cirrojob of “EXECUTE PROJECT project_name”



See Also