Skip to content

FAQ

What is the difference between local and global targets?

A target is a set of attributes definining the remote SAS server. When running locally, inside a project (eg a GIT repository) these attributes are taken from the sasjsconfig.json file, whilst any authorisation attributes are retrieved from the .env.$(targetname) file (where they are typically .gitignore'd for security).

When running outside of a project, the attributes are taken from the ~/.sasjsrc file in the home directory. In this case, the authorisation details are also stored in the same file.

The sasjs command will "discover" if it is inside a local project by the presence of a sasjs/sasjsconfig.json file in the current, or any of the parent directories. If not found, then the ~/.sasjsrc file will be searched instead.

It's worth noting that there are typically MORE attributes defind in a local target, because this is where an application is normally configured in detail for deployment. The global target is more for general use, such as running arbitrary jobs or SAS code.