Command Usage: sam v8_5_2
sam get dataset

Just having some fun...
Command Description:

NOTE: copies the files of a dataset first on the cache of
your SAM station and then to the directory specified in "destination" or 
where  the sam command is invoked. In contrast to the dh get lite command, 
this command creates a SAM project and consumer to get the files.
The tool can be run in a "dry" mode where no actual staging is parformed. 
To achieve that downloadPlugin option may be set to "echo". 
The command is recoverable via "sam generate strict recovery project"

The node parameter can be a comma separated list: in this case one of the entries is picked at random.

The downloadPlugin has two possible forms. The simpler form is a string containing
no '@' characters, which will be used as "<plugin> <sourcefile> <destination>". The
advanced form is a template string which can contain any of the following:
  @node - the node name for the project
  @src - the full path of the new file
  @dest - the destination directory
  @filename - the name of the new file
For example, copying files to a different host could be done with
'scp @src hostname.fnal.gov:/some/path'
            


Usage:
       sam get dataset <--requiredOptions> [--options] [-flags]

Where:

  --requiredOptions:
	             --station=<value> 

  --options:
	             --appName=<value> 
	          --appVersion=<value> 
	    --corbaCallTimeout=<value> # time in seconds for CORBA method calls to return before timing out (default: 0; zero implies no timeout)
	        --definitionId=<value> # DB ID number of the dataset definition to be used to create the project file list
	      --definitionName=<value> # name of the dataset definition to be used to create the project file list
	         --destination=<value> # Target location for incoming files
	      --downloadPlugin=<value> # Override default transfer machanism (samcp) with user specified command.
	            --filelist=<value> # comma separated list of files
	               --group=<value> # Use SAM Work group to run get dataset project against
	            --nodeName=<value> # Override default (sam_download) node name that tool uses to receive files from SAM station
	             --project=<value> # Override random project name generated by the command
	       --retryInterval=<value> # retry interval base in seconds; will multiply this base times retryCount (default: 5)
	         --retryJitter=<value> # retry jitter, random jitter added to base retry interval times retryCount (default: 5)
	       --retryMaxCount=<value> # number of times to retry CORBA calls for retriable exceptions (default: 25; zero implies no retries)
	          --snapshotId=<value> # DB ID number of an existing snapshot to be used as the project file list
	        --snapshotName=<value> # name of an existing snapshot to be used as the project file list
	     --snapshotVersion=<value> # "new", "last", or an existing snapshot version taken with the specified dataset definition
	             --timeout=<value> # timeout value in seconds

   -flags:
	                            -c # automatically close all servants after each method call
	                            -d # debug mode
	                            -s # retrySilently mode (do not issue messages to stderr on proxy retries)
	                            -t # time-it mode (print additional info on timings)
	                            -v # verbose mode

Synonymous Options:
	              --def-id=<value> # synonym for --definitionId=<value>
	            --def-name=<value> # synonym for --definitionName=<value>
	               --defid=<value> # synonym for --definitionId=<value>
	             --defname=<value> # synonym for --definitionName=<value>
	             --snap-id=<value> # synonym for --snapshotId=<value>
	           --snap-name=<value> # synonym for --snapshotName=<value>
	            --snap-ver=<value> # synonym for --snapshotVersion=<value>
	        --snap-version=<value> # synonym for --snapshotVersion=<value>
	              --snapid=<value> # synonym for --snapshotId=<value>
	            --snapname=<value> # synonym for --snapshotName=<value>
	             --snapver=<value> # synonym for --snapshotVersion=<value>
	         --snapversion=<value> # synonym for --snapshotVersion=<value>

Must specify at least one of:
	--filelist=<value> OR --definitionName=<value> OR --definitionId=<value> OR --snapshotVersion=<value> OR 
	    --snapshotName=<value> OR --snapshotId=<value> 

Mutually Exclusive Options:
	--definitionName=<value> OR --definitionId=<value> 
	--snapshotName=<value> OR --snapshotId=<value> 
	--snapshotName=<value> OR --snapshotVersion=<value> 

Incompatible Option Combinations:
	[definitionName, definitionId, snapshotVersion] OR [snapshotName, snapshotId] 

Required Data Types:
	                       appName : string 
	                    appVersion : string 
	              corbaCallTimeout : int 
	                  definitionId : long 
	                definitionName : string 
	                   destination : string 
	                downloadPlugin : string 
	                      filelist : string 
	                         group : string 
	                      nodeName : string 
	                       project : string 
	                 retryInterval : int 
	                   retryJitter : int 
	                 retryMaxCount : int 
	                    snapshotId : long 
	                  snapshotName : string 
	               snapshotVersion : SnapshotVersion 
	                       station : string 
	                       timeout : int 

You may omit "-c" if the $SAM_PYAPI_AUTO_CLOSE_SERVANTS environmental variable is set.
You may omit "--corbaCallTimeout=<value>" if the $SAM_PYAPI_CORBA_CALL_TIMEOUT environmental variable is set.
You may omit "--downloadPlugin=<value>" if the $SAM_GET_DATASET_PLUGIN environmental variable is set.
You may omit "--group=<value>" if the $SAM_GROUP environmental variable is set.
You may omit "--nodeName=<value>" if the $SAM_GET_DATASET_NODE environmental variable is set.
You may omit "--project=<value>" if the $SAM_PROJECT environmental variable is set.
You may omit "--retryInterval=<value>" if the $SAM_PYAPI_RETRY_INTERVAL environmental variable is set.
You may omit "--retryJitter=<value>" if the $SAM_PYAPI_RETRY_JITTER environmental variable is set.
You may omit "--retryMaxCount=<value>" if the $SAM_PYAPI_RETRY_MAX_COUNT environmental variable is set.
You may omit "-s" if the $SAM_PYAPI_RETRY_SILENTLY environmental variable is set.
You may omit "--station=<value>" if the $SAM_STATION environmental variable is set.

UNIX ExitStatus:
	             Success :   0
	Unhandled exceptions : 127


See Also: