Skip to content
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

[TASK] Documentation for 5.2 #1007

Closed
JoernBerkefeld opened this issue Jun 29, 2023 · 1 comment
Closed

[TASK] Documentation for 5.2 #1007

JoernBerkefeld opened this issue Jun 29, 2023 · 1 comment
Assignees
Labels
chore Jira issue-type "Task" documentation Improvements or additions to documentation
Milestone

Comments

@JoernBerkefeld
Copy link
Contributor

JoernBerkefeld commented Jun 29, 2023

deploy

Command: mcdev deploy [business unit] [metadata type] [metadata key] [--fromRetrieve] [--refresh] [--changeKeyValue=yourNewKey] [--changeKeyField=otherFieldInJson] [--execute]

[...]

deploy & execute:

This special combination will execute/start items after creating or updating them on the server.

Example:

mcdev deploy MyProject/DEV query --execute
mcdev deploy MyProject/DEV query "key1,key2" --execute
mcdev deploy MyProject/DEV query "key1" --fromRetrieve --execute

mcdev deploy MyProject/DEV automation --execute
mcdev deploy MyProject/DEV automation "key1,key2" --execute
mcdev deploy MyProject/DEV automation "key1" --fromRetrieve --execute

Currently supported types for deploy & execute:

Name CLI Argument Effect
Automation automation Schedules automation according to already existing (but paused) schedule
Query query Starts query execution

https://github.com/Accenture/sfmc-devtools/wiki/06.b-~-Standard-Commands/_edit

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:

  • The percent sign (%) represents zero, one, or multiple characters
  • The underscore sign (_) represents one, single character
LIKE Operator Description
--like.Name "a%" Finds any values that start with "a"
--like.key "%a" Finds any values that end with "a"
--like.name "%or%" Finds any values that have "or" in any position
--like.CustomerKey "_r%" Finds any values that have "r" in the second position
--like.Description "a_%" Finds any values that start with "a" and are at least 2 characters in length
--like.customerKey "a__%" Finds any values that start with "a" and are at least 3 characters in length
--like.steps.activities.name "a%o" Finds any values that start with "a" AND ends with "o"
--like.key "a%,%o" Finds any values that start with "a" OR ends with "o"

execute

Command: mcdev execute <business unit> <type> [key] [--like] [--schedule]

Alias: mcdev exec

This command lets you start / run / execute metadata of a given type and key.

Currently supported types:

Name CLI Argument Effect
Automation automation RunOnce or Schedules automation according to already existing schedule
Query query Starts query execution

Example:

mcdev execute MyProject/DEV automation key1
mcdev execute MyProject/DEV automation "key1,key2,key3"

mcdev execute MyProject/DEV query key1
mcdev execute MyProject/DEV query "key1,key2,key3"

execute with --like operator:

mcdev execute MyProject/DEV automation --like.key "myprefix_%"
mcdev execute MyProject/DEV query --like.key "myprefix_%" --like.r__folder_Path "Query/Testing%"

execute with --schedule operator:

Instead of running an automation once, you can also start it with it's schedule

mcdev execute MyProject/DEV automation key1 --schedule

execute on all BUs:

This is a variation of execute command that allows you to execute specified items on all BUs. mcdev will look for the items of specified types and keys on all BUs and execute them.

Example:

mcdev execute MyProject/* query key1
mcdev execute MyProject/* automation "key1,key2"
mcdev execute MyProject/* query "key1,key2,key3"

schedule

Command: mcdev schedule <business unit> <type> [key] [--like]

Alias: mcdev sched

This command is a shortcut for mcdev execute --schedule.

Currently supported types:

Name CLI Argument Effect
Automation automation Schedules automation according to already existing (but paused) schedule

Example:

mcdev schedule MyProject/DEV automation key1
mcdev schedule MyProject/DEV automation "key1,key2,key3"

schedule with --like operator:

mcdev schedule MyProject/DEV automation --like.key "myprefix_%"

schedule on all BUs:

This is a variation of execute command that allows you to execute specified items on all BUs. mcdev will look for the items of specified types and keys on all BUs and execute them.

Example:

mcdev schedule MyProject/* automation key1
mcdev schedule MyProject/* automation "key1,key2"

pause

Command: mcdev pause <business unit> <type> [key] [--like]

Alias: mcdev exec

This command lets you pause metadata of a given type and key.

Currently supported types:

Name CLI Argument Effect
Automation automation pauses scheduled automation

Example:

mcdev pause MyProject/DEV automation key1
mcdev pause MyProject/DEV automation "key1,key2,key3"

pause with --like operator:

mcdev pause MyProject/DEV automation --like.key "myprefix_%"
mcdev pause MyProject/DEV automation --like.key "myprefix_%" --like.r__folder_Path "Query/Testing%"

pause on all BUs:

This is a variation of pause command that allows you to pause specified items on all BUs. mcdev will look for the items of specified types and keys on all BUs and pause them.

Example:

mcdev pause MyProject/* automation key1
mcdev pause MyProject/* automation "key1,key2,key3"

fixKeys

Command: mcdev fixKeys <business unit> <type> [key] [--like] [--execute] [--schedule]

Alias: mcdev fx

Retrieves specified metadata to ensure it works on the latest server version, prepares the update locally to ensure the key matches the name, and redeploys the metadata.

Example:

mcdev fixKeys MyProject/DEV dataExtension
mcdev fixKeys MyProject/DEV query
mcdev fixKeys * query "key1,key2" 
mcdev fixKeys * query "key1,key2" --execute
mcdev fixKeys MyProject/DEV automation
mcdev fixKeys MyProject/DEV automation --execute
mcdev fixKeys MyProject/* automation --like.name="foobar%"
mcdev fixKeys MyProject/* automation --like.name="foobar%" --schedule

Please, note that you might need to retrieve dependent metadata to have up-to-date data in the retrieve-folder. For example, in case of queries after fixing the keys, you should retrieve automations.

Note to CLI experts:

You can run this command without the interactive wizard asking questions using the --skipInteraction (or short--yes/--y) flag. In this case, you need to provide a few values in the command:

mcdev fixKeys MyProject/* query --y.fixKeysReretrieve
mcdev fixKeys MyProject/* query --y.fixKeysReretrieve=false
CLI Argument Description
--y.fixKeysReretrieve enable automatic re-retrieval of metadata that's dependant on the fixed type
--y.fixKeysReretrieve=false skip automatic re-retrieval of metadata that's dependant on the fixed type
MetadataType CLI argument Retrieved by Default retrieve deploy (create) deploy (update) delete changeKey buildTemplate retrieveAsTemplate Description
Data Designer Set Definitions attributeSet - Yes (beta) - - - - - - BETA: Data Extensions linked to Attribute Groups in Data Designer.

https://github.com/Accenture/sfmc-devtools/wiki/07.-Advanced-Configuration/_edit

--noLogColors

Optionally, you can disable colors in CLI output. This is useful if you integrate mcdev into systems that cannot display color codes.

Examples:

mcdev retrieve --noLogColors
mcdev deploy --noLogColors
@JoernBerkefeld
Copy link
Contributor Author

copied to wiki

@JoernBerkefeld JoernBerkefeld added the documentation Improvements or additions to documentation label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Jira issue-type "Task" documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant