Import Instructions
User Manual:
Open the PDF directly: View PDF .
Page Count: 6
Download | ![]() |
Open PDF In Browser | View PDF |
Overview There are five types of data that need to be imported/exported at the same time: SKUs, ingredients, product lines, formulas, and manufacturing lines. At the customer's request, manufacturing lines do not need to be imported, but the relation between SKUs and manufacturing lines still does. In addition, for interoperability with existing spreadsheets, the formulas and their ingredients are specified in the same file. CSV files do a good job representing table data, and are extremely easy to parse. In addition, CSVs are among the most space-efficient formats, so long as the tables they are representing are themselves the minimal. As discussed above, four C SV (comma-separated values) files are specified, and their headers are defined below: Filename Prefix Header skus SKU#,Name,Case UPC,Unit UPC,Unit size,Count per case,PL Name,Formula#,Formula factor,ML Shortnames,Rate,Mfg setup cost,Mfg run cost,Comment ingredients Ingr#,Name,Vendor Info,Size,Cost,Comment product_lines Name formulas Formula#,Name,Ingr#,Quantity,Comment File format 1. The names of the files m ust be prefixed by an identifying string, as defined above. The filenames must end in “.csv”. More precisely, the filenames m ust constitute matches for the following regular expressions conforming to P CRE standard: ○ SKUs: ^ skus(\S)*\.csv$ ○ Ingredients: ^ingredients(\S)*\.csv$ ○ Product Lines: ^ product_lines(\S)*\.csv$ ○ Formulas: ^formulas(\S)*\.csv$ 2. The CSV files must be properly delimited and escaped. RFC4180 specifies the format of a CSV file. Note specifically: ○ Spaces (and other space-like characters) m ust not be ignored if they are part of a field. ○ Null values, if they are used, must be denoted by an empty string (i.e., two consecutive commas, or a comma followed by a CRLF character). ○ The double quote symbol (ASCII 034) must be properly quoted. 3. A valid header, as defined above, m ust be included as the first line in each file. The header is case-insensitive. 4. Data types, uniqueness, requiredness, autogenerability of attributes in the files m ust conform to specifications in the Evolution requirements. If an attribute is not specified, it should follow the requirements below: ○ All string-typed attributes must be no more than 1000 characters. ○ All Integer-typed attributes must be within range of [− 231 , 231 ) (i.e., a 32-bit signed integer). All floating-point numbers m ust be in decimal, and have a leading 0 (before the decimal place) if the value is less than 1.0. ○ The column M L Shortnames in s kus.csv contains CSV cells. Each of the CSV cell items m ust be a string with no whitespace. 5. Each file must contain no more than 1,000,000 lines. The records m ay be in no particular order. 6. For mixed-unit expressions, e.g., ones for the "Size" attribute of an ingredient, the following processing algorithm must be used. ○ The numbers (whole or decimal) are separated from non-number (the unit part). More formally, the expressions must constitute full matches for the following PCRE-standard regular expression: l(\d*\.?\d+)\s*(\D.*|)$, where the number part will be taken from group 1 of the match, and the unit part from group 2. ○ The unit part is then sanitized as follows: i. Trimmed of whitespace on both ends ii. Dots (".") and whitespaces (" ") are replaced with empty string iii. Converted to lowercase iv. Any trailing ‘s’ is removed ○ ○ The unit part (after sanitization) is then interpreted by matching it exactly to the list below. Unit Accepted forms Mass-based units Ounce "oz", "ounce" Pound "lb", "pound" Imperial ton "ton" Gram "g", "gram" Kilogram "kg", "kilogram" Volume-based units Fluid ounce "floz", "fluidounce" Pint "pt", "pint" Quart "qt", "quart" Gallon "gal", "gallon" Milliliter "ml", "milliliter" Liter "l", "liter" Count-based units Count "ct", "count" Upload Specifications 1. Only one file m ay be submitted in one import session. This file may be of any type. 2. All submitted CSV file(s) may be assumed to have MIME type t ext/csv, as stipulated in RFC4180 §3. 3. The following checks w ill be performed on each file individually. If any of the check fails, the file will be rejected as a whole, and an appropriate error message will be displayed for the administrator. ○ File validity: the file must be standards-compliant, and contain the required headers in the order specified. The matching of headers should be case-insensitive. ○ Duplicate records: the file must not contain d uplicate records in itself. The file may contain collision(s) to r ecords existing in the system. Refer to the Collision Resolution algorithm in the next section when a collision is detected. ○ Data validity: where required, inputs must conform to standards. ■ UPC numbers m ust conform to the UPC-A standard ■ Sanitized units in m ixed-unit expressions must be one in the accepted list. Further, units used in f ormulas.csv must be logically convertible to the original unit used in the ingredients. Similarly, if a record constitutes ac ollision in i ngredients.csv, the unit, if different than that of the existing record, must be logically convertible to the existing unit. ○ Empty attributes: all required attribute(s) m ust be supplied, except when both of the following are true: ■ It is marked as autogeneratable in the Evolution requirements; ■ The record whose required attribute is empty contains no c ollision. 4. Referential integrity must be preserved in the file. Note that the following relations exist among the files / corresponding entries in the system: ○ In skus.csv, ■ PL Name must be existing in the system. ■ Formula# must be existing in the system. ■ All CSV cell items in ML Shortnames must be existing in the system. ○ In formulas.csv: ■ Ingr# must be existing in the system. Example formulas.csv: Formula#,Name,Ingr#,Quantity,Comment 1001,Formula1,2001,0.1250000000, 1001,Formula1,2002,0.2500000000, 1002,Formula2,2001,0.1250000000, 1002,Formula2,2006,0.0005000000, Example ingredients.csv: 2001,Bread,Butternut,340g,2.29,This bread is used to make all the burger 2002,Beef,Beef Choice,2lb,12.25, 2006,Turkey,,424 pounds,666.66, Example product_lines.csv: Hamburger Salad Pasta Example skus.csv: SKU#,Name,Case UPC,Unit UPC,Unit size,Count per case,PL Name,Formula#,Formula factor,ML Shortnames,Rate,Mfg setup cost,Mfg run cost,Comment 1001,Burger Beef,042272010264,725272730706,600g,50,Hamburger,1001,1,"line1,,,,",1,$1,$2, 1002,Burger Turkey,987654321098,705632085943,250g,80,Hamburger,1001,1,"line1",1,$1,$2,
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Producer : Skia/PDF m75 Page Count : 6EXIF Metadata provided by EXIF.tools