In order to support attachment migration using a URL or local file path from a CSV file, the CSV file containing the urls (the attachments file) must be structured as follows:
There must be the following columns:
- A column that identifies the parent record (to which the attachment is associated)
- Either a column that identifies the url or local file path from where the attachment can be downloaded OR a string defining how to build the url from the file name column (Advanced).
Optionally, the following additional columns may be defined:
- A column that identifies the file name of the attachment, some part of it (optionally including extension) or a string that contains it (e.g. the URL) If this is not defined, the file name of the attachment must be entered in the File Name Format (Advanced). The Advanced configuration options of File Name Regex and File Name format can be used to transform the csv file identifier into a final file name.
- A column that identifies the url or local file path from where the attachment can be downloaded. If this is not defined, a string defining how to build the URL from the file name column values will need to be configured (Advanced)
- The exact size of the attachment (in bytes)
-
The content type of attachment (mime type - for example, image/jpeg)
Note that Precision Bridge can only download the file if either a url is given (prefixed http or https:) or a local file path is given. Any other url string will result in an error.
The attachment file must be configured as a source file in the Precision Bridge CSV Connection. See the article Configuring CSV File Definitions for more information.
The file containing the parent records (to which the attachments belong) must also be configured as a source file.
Note the following:
- The parent source file must have a column that uniquely identifies each record. At execution time, these values will correlate with the value in the parent id column in the attachments file to identify the target record to which the attachment belongs.
See the sample files below, showing the relationship between the parent records and their attachments:
Attachments csv file:
Parent (comments) csv file:
In Precision Bridge, the CSV Configuration will be something like this (note that the columns do not need to be named the same or be in the same order as shown below).
Comments
0 comments
Please sign in to leave a comment.