Les produits et services pour la province de Québec, Canada se trouvent à http://www.drupont.com.
QuébecLes produits et services pour la province de Québec, Canada se trouvent à http://www.drupont.com. |
Stumped on how to untangle multi-value fields within a table?Create one xPort template for each normalized grouping of data contained in the table, then run each template as a separate pass against the table to create individual export files.
All exports should contain the zero-numbered field (see the “Nbr” column) since is contains the key. If there are 0*1, 0*2, etc. values in the field number, that indicates a multi-part key, so include them all, on every xport template so since this is the main relational key between the various exports for that table.
Do one pass with a MAIN template that contains just “S” (see “S/M” column) single-value fields. Avoid duplicate field definitions which have the same “Nbr” value. Duplicates will generally provide identical output when using CSV or an variable-length output format. Only export fields with a Typ value of “F”, since they identify fysical data rows. “S” type fields are formulas which can cause xPort to crash when used inappropriately.
The “M” S/M fields are more challenging, since they indicate multiple values; · Sometimes each field value contains something different (e.g. address). In that case export each value as a separate column using the [x] suffix, where x = value number. Address[1] could be street, address[2] could be city, etc. I usually throw these into the main export with all the Single-value fields. · Other multi-value fields are logically grouped (this is where the fun begins). If you’re lucky and the system hasn’t been hacked up too badly, these groups will be close together. · Use the xNormal report to provide key stats that can help you put together one template per logicial group if you have a large record format. Specify the MAIN template created above as input to xNormal – it ignores the template details and always analyzes the entire table. · For a quick-and-dirty analysis of column contents, use SF6 from the F6 function keys list available at the main XPT Data Inventory screen.
Happy xPorting!
|
Search |