requests migrate
Use dynomate-cli requests migrate to convert a legacy collection of .toml files to DNML in the same folder.
It is the same as Migrate collection in the app.
Migrate a collection
Give the collection folder with --collection, the only option:
- The command converts all requests in the folder, not in nested folders.
- It writes the
collection.dnmlmarker only if all converted requests are valid. - It keeps the
.tomlfiles as a recovery copy, and does not changeenvironments/.
Review the new files before you remove the legacy files.
What changes
Each legacy request becomes a .dnml file with the same name, operations and expressions. References become DNML templates. This legacy request:
recent-orders.toml name = 'recent-orders'[[operations]]type = 'query'name = 'Find recent order'tableArn = 'arn:aws:dynamodb:ap-southeast-2:111122223333:table/Orders'keyConditionExpression = 'accountId = :accountId'consistentRead = falsescanIndexForward = false[operations.expressionAttributeNames][operations.expressionAttributeValues]':accountId' = 'account#42' becomes recent-orders.dnml:
recent-orders.dnml version = "1.0"name = "recent-orders"[execution]onError = "continue"[[dynamodb.query]]name = "Find recent order"tableArn = "arn:aws:dynamodb:ap-southeast-2:111122223333:table/Orders"keyConditionExpression = "accountId = :accountId"consistentRead = falsescanIndexForward = falsereturnConsumedCapacity = "indexes"[dynamodb.query.expressionAttributeNames][dynamodb.query.expressionAttributeValues]":accountId" = "account#42" To keep the legacy behavior, the command adds:
[execution] onError = "continue", the DNML default error policy.returnConsumedCapacity = "indexes"on each query.returnValues = "none"on each update.
You can change these later. The marker changes too:
collection.toml version = '1.0'type = 'dynomate-collection'created = '2026-09-10T12:00:00Z'[metadata]author = 'Docs' collection.dnml version = "1.0"type = "dynomate-collection"created = "2026-09-10T12:00:00Z"[metadata]author = "Docs" Failures
If a request does not convert, the command stops and shows the file and field, but no values from your files.
The command then removes the new files, and the collection stays a legacy collection. Correct the file and run the command again.
- A required field is missing, or an unknown field is present.
- The file name is not the request
name. - The operation type is not query, update, put or delete.
- A different
.dnmlfile has the same name. Move it, because the command never overwrites it.
A path that is not a collection fails immediately:
Run it again
You can safely run the command again. On a DNML collection, it changes nothing:
If a migration stopped, run it again. Converted files that match are not conflicts.
Run before migration
requests run does not run requests from a legacy collection. It shows the migrate command:
Exit codes
| Code | Meaning |
|---|---|
0 | The collection now uses DNML. |
1 | Migration failed. The error is on standard error. |
2 | The arguments are not valid, for example no --collection. |