-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] harmonize how type/key combos are passed in with sf-cli #1272
Comments
Closed by #1274. |
https://github.com/Accenture/sfmc-devtools/wiki/06.b-~-Standard-Commands/_edit retrieveCommand: Alias: Retrieves all metadata from the specified Business Unit. You can limit what types are retrieved by default using the mcdev selectTypes command or by changing the list in the config file directly. Example: mcdev retrieve MyProject/DEV You can omit the Business Unit which will trigger an interactive mode based on your config: Example: mcdev retrieve If you already know the credentials name but want to only select the Business Unit interactively try this mcdev retrieve MyProject retrieve specific type: If you want to retrieve only a certain metadata type, let's say Similarly, you can pass in multiple comma-separated types but make sure to put them in double quotes to work on all systems. Example: mcdev retrieve MyProject/DEV script
mcdev retrieve MyProject/DEV "script,query,automation" retrieve specific type and key: If you wish you may also specify the exact keys that need to be retrieved, filtering down on what's in your retrieve folder even further. Specified keys apply as a filter for all types you specify. If your naming convention does not allow for such an aggregation then please run separate commands for each type. Example: mcdev retrieve MyProject/DEV dataExtension "key1"
mcdev retrieve MyProject/DEV dataExtension "key1,key2"
mcdev retrieve MyProject/DEV "script,dataExtension,importFile" "key1,key2" Note: This is not supported by types retrieve all BUs: A special variant of this command allows you to retrieve all Business Units of a given credential at once. mcdev retrieve MyProject/* or even mcdev retrieve "*"
retrieve specific type and key via --like option: Example: mcdev retrieve MyProject/DEV dataExtension --like.key "key1%"
mcdev retrieve MyProject/DEV asset --like.steps.activities.name "a%o"
mcdev retrieve MyProject/DEV asset --like.key "key1%" --like.steps.activities.name "a%o" How does it work? There are two wildcards often used in conjunction with the LIKE operator:
retrieve specific type and key via --metadata option: This option is exceptionally flexible because it allows you to specify multiple type-key combos simultaneously. If set, it overrides the type or key you specified the old-fashioned way. Examples:
mcdev retrieve MyProject/DEV --metadata dataExtension
mcdev retrieve MyProject/DEV -m dataExtension
mcdev retrieve MyProject/DEV --metadata dataExtension:myKey
mcdev retrieve MyProject/DEV --metadata dataExtension:k:myKey
mcdev retrieve MyProject/DEV --metadata dataExtension:key:myKey
mcdev retrieve MyProject/DEV -m dataExtension:myKey
mcdev retrieve MyProject/DEV -m dataExtension:key:myKey
mcdev retrieve MyProject/DEV -m dataExtension:k:myKey
mcdev retrieve MyProject/DEV --metadata dataExtension:i:myId
mcdev retrieve MyProject/DEV --metadata dataExtension:id:myId
mcdev retrieve MyProject/DEV -m dataExtension:i:myId
mcdev retrieve MyProject/DEV -m dataExtension:id:myId
mcdev retrieve MyProject/DEV --metadata dataExtension:n:myName
mcdev retrieve MyProject/DEV --metadata dataExtension:name:myName
mcdev retrieve MyProject/DEV -m dataExtension:n:myName
mcdev retrieve MyProject/DEV -m dataExtension:name:myName
mcdev retrieve MyProject/DEV -m dataExtension:myKey -m dataExtension:myKey2 -m dataExtension:i:myId -m script |
instead of requiring positionals like in
mcdev retrieve cred/bu type key
we could use "options":Examples:
The text was updated successfully, but these errors were encountered: