On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Read | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap lists the specified assets. | |||||||||||||
Prerequisites: | [None] | |||||||||||||
Support and limitations: | Ultra pipelines: Works in Ultra Pipelines.Spark mode: Not supported in /wiki/spaces/SD/pages/1437917 modeTask 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] | |||||||||||||
|
|
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]
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|