SAS Viya. Kevin D. Smith

Читать онлайн книгу.

SAS Viya - Kevin D. Smith


Скачать книгу
out = conn.help(actionset='builtins')

      NOTE: Information for action set 'builtins':

      NOTE: builtins

      NOTE: addNode - Adds a machine to the server

      NOTE: removeNode - Remove one or more machines from the server

      NOTE: help - Shows the parameters for an action or lists all

      available actions

      NOTE: listNodes - Shows the host names used by the server

      NOTE: loadActionSet - Loads an action set for use in this

      session

      NOTE: installActionSet - Loads an action set in new sessions

      automatically

      NOTE: log - Shows and modifies logging levels

      NOTE: queryActionSet - Shows whether an action set is loaded

      NOTE: queryName - Checks whether a name is an action or

      action set name

      NOTE: reflect - Shows detailed parameter information for an

      action or all actions in an action set

      NOTE: serverStatus - Shows the status of the server

      NOTE: about - Shows the status of the server

      NOTE: shutdown - Shuts down the server

      NOTE: userInfo - Shows the user information for your connection

      NOTE: actionSetInfo - Shows the build information from loaded

      action sets

      NOTE: history - Shows the actions that were run in this session

      NOTE: casCommon - Provides parameters that are common to many

      actions

      NOTE: ping - Sends a single request to the server to confirm

      that the connection is working

      NOTE: echo - Prints the supplied parameters to the client log

      NOTE: modifyQueue - Modifies the action response queue settings

      NOTE: getLicenseInfo - Shows the license information for a

      SAS product

      NOTE: refreshLicense - Refresh SAS license information from

      a file

      NOTE: httpAddress - Shows the HTTP address for the server

      monitor

      Notice that help is one of the actions in the builtins action set. To display the Help for an action, use the action keyword argument. You can display the Help for the help action as follows:

      In [6]: out = conn.help(action='help')

      NOTE: Information for action 'builtins.help':

      NOTE: The following parameters are accepted.

      Default values are shown.

      NOTE: string action=NULL,

      NOTE: specifies the name of the action for which you want help.

      The name can be in the form 'actionSetName.actionName' or

      just 'actionName'.

      NOTE: string actionSet=NULL,

      NOTE: specifies the name of the action set for which you

      want help. This parameter is ignored if the action

      parameter is specified.

      NOTE: boolean verbose=true

      NOTE: when set to True, provides more detail for each parameter.

      Looking at the printed notes, you can see that the help action takes the parameters actionset, action, and verbose. We have previously seen the actionset and action parameters. The verbose parameter is enabled, which means that you will get a full description of all of the parameters of the action. You can suppress the parameter descriptions by specifying verbose=False as follows:

      In [7]: out = conn.help(action='help', verbose=False)

      NOTE: Information for action 'builtins.help':

      NOTE: The following parameters are accepted.

      Default values are shown.

      NOTE: string action=NULL,

      NOTE: string actionSet=NULL,

      NOTE: boolean verbose=true

      In addition to the Help system that is provided by CAS, the SWAT module also enables you to access the action set and action information using mechanisms supplied by Python and IPython. Python supplies the help function to display information about Python objects. This same function can be used to display information about CAS action sets and actions. We have been using the help action on our CAS object. Let’s see what the Python help function displays.

      In [8]: help(conn.help)

      Help on builtins.Help in module swat.cas.actions object:

      class builtins.Help(CASAction)

      | Shows the parameters for an action or lists all available actions

      |

      | Parameters

      | ----------

      | action : string, optional

      | specifies the name of the action for which you want help.

      | The name can be in the form 'actionSetName.actionName' or

      | just 'actionName'.

      |

      | actionset : string, optional

      | specifies the name of the action set for which you want help.

      | This parameter is ignored if the action parameter is

      | specified.

      |

      | verbose : boolean, optional

      | when set to True, provides more detail for each parameter.

      | Default: True

      |

      | Returns

      | -------

      | Help object

      ... truncated ...

      It gets a little confusing in that code snippet because both the name of the function in Python and the name of the action are the same, but you see that the information displayed by Python’s Help system is essentially the same as what CAS displayed. You can also use the IPython/Jupyter Help system (our preferred method) by following the action name with a question mark.

      In [9]: conn.help?

      Type: builtins.Help

      String form: ?.builtins.Help()

      File: swat/cas/actions.py

      Definition: ?.help(_self_, action=None,

      actionset=None,

      verbose=True, **kwargs)

      Docstring:

      Shows the parameters for an action or lists all available actions

      Parameters

      ----------

      action : string, optional

      specifies the name of the action for which you want help. The name

      can


Скачать книгу