I have a constant defined in my migration definition like so:
constants:
destination: "private://working_papers/"
There are 30,000 files that will come in as part of the migration. I would like to create directory destinations on the fly, based on source field values or whatever I want.
So:
destination: constants/destination
Would become:
destination: constants/destination/@source_field_value/@source_field_value2
This would be to reduce the raw number of files appearing in a given directory. When I try the above, nothing happens, even though the migration succeeds. The files don't go anywhere.
How can I do this? For reference, here is the field in the process section of the definition:
field_paper_working_paper:
plugin: file_import
source: doc_format_url
destination: constants/destination
uid: 1
rename: TRUE