SnapLogic List
On this Page
Snap type: | Read | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap lists the specified assets. | |||||||
Prerequisites: | [None] | |||||||
Support and limitations: | Works in Ultra Task Pipelines. | |||||||
Account: | Accounts are not used with this Snap. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Asset type required | Required. Select the type of asset to list. Options available include:
Default value: ALL | |||||||
Asset path | Required. Absolute path for the asset in the form of: /<org>/<project_space>/<project>/<asset> Examples: /myorg/Engineering/Status/LatestDefects Default value: [None] | |||||||
Snap Execution | Select one of the following three modes in which the Snap executes:
Default Value: Execute only |
Examples
List All
To list all assets for a particular project, set Asset type to All and Asset Path to the project path as /<org>/<project_space>/<project> . The output information looks as follows:
Using List Snap to Copy Assets
In this example, the SnapLogic List Snap is used to find assets in a SnapLogic project so they can then be created in another project. The pipeline consists of: SnapLogic List + Mapper + File Reader + File Writer.
First, configure pipeline parameters for source_path and target_path.
Set the SnapLogic List set for the asset type, in this case FILE, and the Asset Path to the source_path pipeline parameter.
Since we want to move files within the SnapLogic database, we use a Mapper Snap to add sldb:// to the asset path and map that to a source_path field.
Next, use a File Reader to read files from the source_path field.
A File Writer Snap is then used to write the files to the target path, with File name set to: 'sldb://' + _target_path + '/' + $['content-disposition'].match("filename=\"(.*)\"")[1]
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.