Metadata import allows the metadata to be added to files through the use of a .csv file. This is largely useful when individual files need individual sets of metadata to be added to them that is not already present. In our examples the Source Connector will be Network File Share and the Destination will be Box. Though it is important to keep in mind that any connector which allows metadata can be used.
...
1) Create a .csv file named "skysync_metadata.csv" in the parent directory of the source files, or within the same directory as the source.
2) Determine the best method to identify the files having metadata added to them.
A) FileName, filename, file_name: These only require the full name of the file including its extension as the value. This should be used if the file names are not repeated throughout the structure of the data set being transferred. Example values: " file.txt, file.docx, Everyday.txt, Plans.pdf"
Panel |
---|
file_name,contract effective date,location,number,agreement type |
B) FilePath, Path, FullPath, File_Path, Full_Path:
...
This column requires the path relative to the root, of the connector. For example if your connector uses the path "Desktop\Box\Job 1" then the values for this column only need to be
...
the folders after "Job 1". This is useful if file names are repeated throughout the structure of the data set being transferred. Example values: "
...
/SkySync-TestData/boxMetadataTemplate/source/test1.txt, /SkySyncbox/Test/Data/test22.txt"
Panel | ||
---|---|---|
| ||
path,contract effective date,location,number,agreement type |
C) FolderName, Folder_Name,foldername: This attribute can be used in conjunction with the "FileName" attribute explained in A. Like the "Path" attribute this can be used to differentiate files that have the same name but are in different locations. Example values: "TestFolder, Boxmetdata, Copied1"
Panel | ||
---|---|---|
| ||
foldername,filename,contract effective date,location,number,agreement type |
Info |
---|
It should be kept in mind that when using a local connector the path can have /c/ however this will not work for NFS connectors. |
3) The names of the remaining columns and their respective values added to the .csv file should correspond with the metadata attributes and necessary values used in the destination.
4) Once the .csv file has been created you can proceed to the job creation steps below.
Example "skysync_metadata.csv" data structures
Key column: file_name
...
.
...
Key column: Path
path,contract effective date,location,number,agreement type
/Desktop/SkySync-TestData/boxMetadataTemplate/source/test1.txt,06/01/2017,philadelphia,12345,Cloud
/Desktop/SkySync-TestData/boxMetadataTemplate/source2/test1.txt,05/01/2017,Las Vegas,54321,Written
Key columns: foldername,filename
foldername,filename,contract effective date,location,number,agreement type
subfolder,test1.txt,06/01/2017,philadelphia,12345,Cloud
subfolder2,test1.txt,06/02/2016,Houston,65432,Cloud
Running and Creating the Metadata Import Job
1) Create a Copy Job, using the directory containing the "skysync_metadata.csv" file as the source
2) Add the words "-Metadata Import" anywhere within the job name, this is not case sensitive but must be present
...
4) Check the source to confirm that the skysync_metadata.csv has been replaced by two files: skysnc_metadata-export.csv and skysync_metadata-processed.csv
5) Check the Destination to confirm metadata is present
Info |
---|
The files present on the Source will transfer to he destination even if the metadata transfer fails. Check the job history and skysnc_metadata-failures.csv if not all of it was moved. |