DataGrab and Matrix fields

» Visit the DataGrab support page

Notes on using DataGrab to import into Matrix fields.

This is a holding page to add notes regarding importing data into a Matrix field.

Preliminary support for Pixel & Tonic’s Matrix is available in DataGrab 1.7.0 and above. Please consider this support as a Beta until further notice.

Version details

  • DataGrab version 1.7.1
  • Matrix version 2.2.4 Earlier versions will not work.

Configuring the import

Configuring the import

The results

The resulting matrix field

Matrix cell types

The beta version currently supports text, date and file cells. Support for other cell types to follow.

Date fields can be formatted in any recognisable date format (YYYY-MM-DD HH:MM:SS is recommended)

Images/files should be uploaded manually to an existing File Upload area and the filename in the data source should be prefixed with the Upload area variable (e.g., /images/uploads/filename.png if filename.png is in the upload area with the id of 1)

Supported data types

CSV and XML imports are supported. I’ll document these better as the beta progresses. Feel free to contact me in the meantime if you need help.

Example data format are:


		<description>Lorem ipsum dolor sit amet…</description>

ie, repeating item elements can be imported into a Matrix. Select the first item in the configuration pulldown, and DataGrab will add the rest

CSV with Matrix rows on separate lines of the file

ID1,"PRODUCT1","Blah, blah, blah.",A1,"OneA","/images/uploads/bnb1.png","","2011-12-11",12.99
ID1,"PRODUCT1","Blah, blah, blah.",A2,"OneB","/images/uploads/bnb2.png","","2011-12-11",13.99
ID1,"PRODUCT1","Blah, blah, blah.",A3,"OneC","/images/uploads/bnb4.png","","2011-12-11",14.99

In the settings assign a unique id (eg, product id) to a custom field. Use that field to check for duplicates and check the Update existing entries setting.

CSV with matrix rows as comma delimited values in a cell

E;"PRODUCT5";"Blah, blah, blah.";"E1,E2";"ThreeA,ThreeB";"/images/uploads/bnb3.png,/images/uploads/bnb2.png";"2011-11-04,2010-11-16"

Note, that the 4th to 7th columns each have 2 comma-separated values. Each value will be assigned to a new matrix row.

Known problems

Please consider this Beta level software. Features may not work and may change in future releases.