This custom step identifies and lists changed files inside a local copy of a Git repository folder. A change is defined as either a new file created, an existing file deleted, or an existing file getting modified.
The custom step also informs you if such changes have been "staged", i.e. marked for a future commit to a remote Git repository.
Git repositories facilitate easy collaborative development of code. Analysts as well as administrators will find this step useful in terms of logging changes and earmarking them for commit to a centralized codebase.
Here's a general idea of how this custom step works (the below is an animated GIF)
which can be further visualized as follows (note this is optional, details below):
Tested in Viya 4, Stable 2022.11
-
A SAS Viya 4 environment (monthly release 2022.11 or later) with SAS Studio Flows.
-
Optional: a connection to CAS: If you choose to use the "Promote to CAS" option, this custom step requires Cloud Analytics Services. Ensure you have access to a CAS server, and have permission to write to the shared Public caslib, so that the custom step can run successfully.
-
Local repository folder: This should be a folder on your filesystem. Ensure that this is a Git folder, i.e., it was originally cloned from a Git repository.
-
(Optional) Promote table to Cloud Analytics Services : if checked, this will lead to the output table getting loaded to a CAS (in-memory) table, therefore making it convenient to be viewed in Visual Analytics. This means that you require the CAS server to be operational (and the Public caslib accessible) at the time of running this custom step.
- Git changes table: Connect a table to the output port which will be used to store the list of changed files (if any) along with the type of change (new, modified, deleted) and whether this change has been staged (true/false).
While this is not essential for the custom step to run, we also provide an example of a Visual Analytics report template, which can be used to monitor changes across local repositories of Git folders. Refer this page to understand how to import the report template into your environment.
- Understanding Git Integration in SAS Studio
- Using Git Functions in SAS
- GIT_STATUS SAS function
- GIT_STATUS_GET SAS function
- Refer to the steps listed here.
Version : 1.0. (07FEB2023)