-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy path_template.step
1 lines (1 loc) · 9.94 KB
/
_template.step
1
{"creationTimeStamp":"2024-10-09T14:06:58.567Z","modifiedTimeStamp":"2024-10-09T14:13:49.915Z","createdBy":"sasdemo","modifiedBy":"sasdemo","name":"_template.step","displayName":"_template.step","localDisplayName":"_template.step","properties":{},"links":[{"method":"GET","rel":"self","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","type":"application/vnd.sas.data.flow.step"},{"method":"GET","rel":"alternate","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","type":"application/vnd.sas.data.flow.step.summary"},{"method":"GET","rel":"up","href":"/dataFlows/steps","uri":"/dataFlows/steps","type":"application/vnd.sas.collection","itemType":"application/vnd.sas.data.flow.step.summary"},{"method":"PUT","rel":"update","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","type":"application/vnd.sas.data.flow.step","responseType":"application/vnd.sas.data.flow.step"},{"method":"DELETE","rel":"delete","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9"},{"method":"POST","rel":"copy","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9/copy","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9/copy","responseType":"application/vnd.sas.data.flow.step"},{"method":"GET","rel":"transferExport","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","responseType":"application/vnd.sas.transfer.object"},{"method":"PUT","rel":"transferImportUpdate","href":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","uri":"/dataFlows/steps/1b779fe0-49c5-4567-8aa2-fdc80b869ef9","type":"application/vnd.sas.transfer.object","responseType":"application/vnd.sas.summary"}],"metadataVersion":0.0,"version":2,"type":"code","flowMetadata":{"inputPorts":[{"name":"inputtable1","displayName":"inputtable1","localDisplayName":"inputtable1","minEntries":1,"maxEntries":1,"defaultEntries":0,"type":"table"}],"outputPorts":[{"name":"outputtable1","displayName":"outputtable1","localDisplayName":"outputtable1","minEntries":1,"maxEntries":1,"defaultEntries":0,"type":"table","supportsView":false,"requiresStructure":false}]},"ui":"{\n\t\"showPageContentOnly\": true,\n\t\"pages\": [\n\t\t{\n\t\t\t\"id\": \"pageOptions\",\n\t\t\t\"type\": \"page\",\n\t\t\t\"label\": \"Options\",\n\t\t\t\"children\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"text1\",\n\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\"text\": \"Dummy entry, named _template, used in sample readme file\",\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"inputtable1\",\n\t\t\t\t\t\"type\": \"inputtable\",\n\t\t\t\t\t\"label\": \"Input table label 1\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"placeholder\": \"\",\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"algorithmToUse\",\n\t\t\t\t\t\"type\": \"radiogroup\",\n\t\t\t\t\t\"label\": \"Type of algorithm to use:\",\n\t\t\t\t\t\"items\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Basic\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Intermediate\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Advanced\"\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"metricsToCalculate\",\n\t\t\t\t\t\"type\": \"list\",\n\t\t\t\t\t\"label\": \"Metrics to calculate:\",\n\t\t\t\t\t\"items\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Minimum\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Maximum\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Standard Deviation\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"value\": \"Average\"\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"max\": null,\n\t\t\t\t\t\"min\": 1,\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"outputtable1\",\n\t\t\t\t\t\"type\": \"outputtable\",\n\t\t\t\t\t\"label\": \"Output table label 1\",\n\t\t\t\t\t\"required\": true,\n\t\t\t\t\t\"placeholder\": \"\",\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"id\": \"pageAdvanced\",\n\t\t\t\"type\": \"page\",\n\t\t\t\"label\": \"Advanced\",\n\t\t\t\"children\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"text2\",\n\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\"text\": \"Dummy entry, named _template, used in sample readme file\",\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"tableOptions\",\n\t\t\t\t\t\"type\": \"textarea\",\n\t\t\t\t\t\"label\": \"Specify advanced table options here:\",\n\t\t\t\t\t\"placeholder\": \"\",\n\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"id\": \"pageAbout\",\n\t\t\t\"type\": \"page\",\n\t\t\t\"label\": \"About\",\n\t\t\t\"children\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"textAbout\",\n\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\"text\": \"_template step\\n==========\\n\\nThe \\\" _template\\\" custom steps performs the following calculations and/or data transformations: ...\\n\\nThe following algorithms are supported: \\n * Basic\\n * Medium\\n * Advanced\\n\\nOutput table options can be specified to ...\\n\",\n\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"sectionPrereqs\",\n\t\t\t\t\t\"type\": \"section\",\n\t\t\t\t\t\"label\": \"Pre-requisites\",\n\t\t\t\t\t\"open\": false,\n\t\t\t\t\t\"visible\": \"\",\n\t\t\t\t\t\"children\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": \"textPrereqs\",\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": \"Pre-requisites: Tested on Viya version Stable yyyy.mm (e.g. 2022.09)\",\n\t\t\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"sectionDocumentation\",\n\t\t\t\t\t\"type\": \"section\",\n\t\t\t\t\t\"label\": \"Documentation\",\n\t\t\t\t\t\"open\": false,\n\t\t\t\t\t\"visible\": \"\",\n\t\t\t\t\t\"children\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": \"textDocumentation\",\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": \"* MEANS procedure in SAS Viya Platform Programming documentation (https://go.documentation.sas.com/doc/en/pgmsascdc/default/proc/n1qnc9bddfvhzqn105kqitnf29cp.htm) \\n* ...\",\n\t\t\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"id\": \"sectionChangelog\",\n\t\t\t\t\t\"type\": \"section\",\n\t\t\t\t\t\"label\": \"Changelog\",\n\t\t\t\t\t\"open\": true,\n\t\t\t\t\t\"visible\": \"\",\n\t\t\t\t\t\"children\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"id\": \"textChangelog\",\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": \"* Version 1.4 (09OCT2024)\\n - Using NOWARN option on %symdel and %sysmacdelete to simplify coding for deletion of SAS macros and macro variables.\\n\\n* Version 1.3 (22DEC2023)\\n - Added sample code snippets to remove intermediate tables, macros and macro variables that are created by the step.\\n\\n* Version 1.2 (04SEP2023)\\n - About tab: Moved text for Prereqs/Documentation/Changelog into expandable sections for readability\\n - Added extras sub-folder to store older version of step in zip file when latest update of step requires very recent version of SAS Studio\\n\\n* Version 1.1 (23OCT2022)\\n - Added pre-reqs area in About tab\\n\\n* Version: 1.0 (13SEP2022)\\n - Initial version\",\n\t\t\t\t\t\t\t\"visible\": \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"syntaxversion\": \"1.3.0\",\n\t\"values\": {\n\t\t\"inputtable1\": {\n\t\t\t\"library\": \"\",\n\t\t\t\"table\": \"\"\n\t\t},\n\t\t\"algorithmToUse\": {\n\t\t\t\"value\": \"Basic\"\n\t\t},\n\t\t\"metricsToCalculate\": [\n\t\t\t{\n\t\t\t\t\"value\": \"Average\"\n\t\t\t}\n\t\t],\n\t\t\"outputtable1\": {\n\t\t\t\"library\": \"\",\n\t\t\t\"table\": \"\"\n\t\t},\n\t\t\"tableOptions\": \"\"\n\t}\n}","templates":{"SAS":"/* Dummy entry, named _template, used in sample readme file */\n/* SAS templated code goes here */\n\n/*-----------------------------------------------------------------------------------------*\n START Macro definitions.\n*------------------------------------------------------------------------------------------*/\n%let _myMacroVariable=456;\n\n%macro _doIt;\n %if &_myMacroVariable=123 %then %do;\n data work._myIntermediate;\n var1=\"&_myMacroVariable\";\n run;\n %end;\n %else %do;\n /*-----------------------------------------------------------------------------------------*\n Writing ERROR: to the SAS log results in the custom step be set in Error mode,\n and hovering over the node will show that error message.\n *------------------------------------------------------------------------------------------*/\n %put ERROR: _myMacroVariable needs to have value 123;\n %end;\n%mend _doIt; \n\n/*-----------------------------------------------------------------------------------------*\n END Macro definitions.\n*------------------------------------------------------------------------------------------*/\n\n%_doIt;\n\n/*-----------------------------------------------------------------------------------------*\n Clean up intermediate tables, macro variables and macro definitions.\n*------------------------------------------------------------------------------------------*/\nproc datasets lib=work noprint nowarn;\n delete _myIntermediate;\nrun; quit;\n\n/*-----------------------------------------------------------------------------------------*\n Delete user-defined SAS macros and SAS macro variables using nowarn option. This to \n prevent warning messages in SAS log in case the item does not exist because it is only\n created conditionally depending on user selections. A valid use case. \n Using nowarn avoids the need for the step author to add additional logic that first checks whether\n the item exists before trying to delete it.\n*------------------------------------------------------------------------------------------*/\n%symdel _myMacroVariable / NOWARN;\n%sysmacdelete _doIt / NOWARN;"}}