- Timestamp:
- 25 Feb 2008, 12:07:36 (17 years ago)
- Location:
- WAeUP_Doc/NewDocumentation
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_Doc/NewDocumentation/ImportNew.html
r3217 r3218 5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 6 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> 7 <title>Import of massdata into the portal</title>7 <title>Import of data into the portal</title> 8 8 <style type="text/css"> 9 9 … … 291 291 </head> 292 292 <body> 293 <div class="document" id="import-of-massdata-into-the-portal"> 294 <h1 class="title">Import of massdata into the portal</h1> 295 <h2 class="subtitle" id="general-procedure">General procedure</h2> 296 <p>A record is read from the input-source-file and the data is checked. If the 297 record can be imported, it is <strong>appended</strong> to the file XXX_imported.csv, 298 otherwise it is <strong>inserted</strong> into the file XXX_pending.csv, if no record 299 with the exact same date already exists in the XXX_pending.csv. The check is 300 done by comparing the md5-digests of the new record with the existing records.</p> 301 <p>When doing the import in pending-only-mode the XXX_pending.csv is taken as 302 input-source-file and if a record can now be imported it is appended to the 303 XXX_imported.csv file and removed from XXX_pending.csv.</p> 304 <p><strong>Caveat</strong>:</p> 305 <blockquote> 306 if an record is inserted into XXX_pending, it will only be removed by 307 importing in pending-only-mode. If a new input-file contains a record for 308 the same object, with different data, that will not be detected at the 309 moment.</blockquote> 310 <p>The XXX_imported.csv and XXX_pending file has these columns added:</p> 293 <div class="document" id="import-of-data-into-the-portal"> 294 <h1 class="title">Import of data into the portal</h1> 295 <div class="section"> 296 <h1><a id="general-procedure" name="general-procedure">General procedure</a></h1> 297 <p>A record is read from the input source file located in the import folder of the Zope instance. The data format is validated against the import data layout selected. If the record can be imported, it is <strong>appended</strong> to the file [layout]_imported.csv (in the same folder), otherwise it is <strong>inserted</strong> into the file [layout]_pending.csv, if no record with exactly the same data already exists. Technically speaking, the md5-digests of the new record is being compared with the existing records.</p> 298 <p>The report files have five additional columns: import_mode, imported_by (the member who did the import), import_date, import_from (input source file name) and error (error message). The pending file can be edited and re-imported by selecting 'pending data only'.</p> 299 <p>There following import modes are recognized: edit, create and remove. The latter deletes the whole record. This mode is available for course results only.</p> 300 <p>Single fields can be cleared in edit mode by inserting 'XXX' in the respective field. Empty fields are ignored.</p> 301 </div> 302 <div class="section"> 303 <h1><a id="the-import-form" name="the-import-form">The import form</a></h1> 311 304 <table class="docutils field-list" frame="void" rules="none"> 312 305 <col class="field-name" /> 313 306 <col class="field-body" /> 314 307 <tbody valign="top"> 315 <tr class="field"><th class="field-name">imported_by:</th><td class="field-body">the member who did the import</td> 316 </tr> 317 <tr class="field"><th class="field-name">import_mode:</th><td class="field-body">edit, create, delete</td> 318 </tr> 319 <tr class="field"><th class="field-name">import_date:</th><td class="field-body">the date and time of the import</td> 320 </tr> 321 <tr class="field"><th class="field-name">imported_from:</th><td class="field-body">the filename of the input-source-file</td> 322 </tr> 323 <tr class="field"><th class="field-name">error:</th><td class="field-body">the error message (empty in XXX_imported)</td> 308 <tr class="field"><th class="field-name">Filename:</th><td class="field-body">Select the file to be imported. This selct box shows all csv files in the import folder</td> 309 </tr> 310 <tr class="field"><th class="field-name">Import Layout:</th><td class="field-body">Select the data layout of the import file.</td> 324 311 </tr> 325 312 </tbody> 326 313 </table> 314 <p>If the button <strong>Bypass QueueCatalog</strong> is shown, click it!</p> 315 <p>Click "Import" to start the import.</p> 316 </div> 317 <div class="section"> 318 <h1><a id="verdicts-import" name="verdicts-import">Verdicts import</a></h1> 319 <p>The import csv file must have one of these headlines:</p> 320 <div class="line-block"> 321 <div class="line">student_id, current_session, current_level, current_verdict</div> 322 <div class="line"><br /></div> 323 <div class="line">matric_no, current_session, current_level, current_verdict</div> 324 <div class="line"><br /></div> 325 <div class="line">student_id,matric_no, current_session, current_level, current_verdict</div> 326 </div> 327 <table class="docutils field-list" frame="void" rules="none"> 328 <col class="field-name" /> 329 <col class="field-body" /> 330 <tbody valign="top"> 331 <tr class="field"><th class="field-name">student_id:</th><td class="field-body">the id of the student</td> 332 </tr> 333 <tr class="field"><th class="field-name">matric_no:</th><td class="field-body">The student's matriculation number. 334 If student_id and matric_no are specified, it is checked, if the student_id 335 and matric_no belong to the same student.</td> 336 </tr> 337 <tr class="field"><th class="field-name" colspan="2">current_session:</th></tr> 338 <tr><td> </td><td class="field-body">The session key (e.g. 6) or session string (e.g. 2006/2007) the verdict refers to.</td> 339 </tr> 340 <tr class="field"><th class="field-name">current_level:</th><td class="field-body">The level key the verdict refers to. On probation levels must be specified as 341 level number + 10 or +20 (e.g. 110 for students on first probation).</td> 342 </tr> 343 <tr class="field"><th class="field-name" colspan="2">current_verdict:</th></tr> 344 <tr><td> </td><td class="field-body">The verdict key from the vocabulary <em>verdicts</em>.</td> 345 </tr> 346 </tbody> 347 </table> 348 <p>Example file:</p> 349 <pre class="literal-block"> 350 matric_no, current_session, current_level,current_verdict 351 MGS0602342,06,200,B 352 MGS0602346,06,200,A 353 MGS0602350,06,200,B 354 MGS0602360,06,200,A 355 MGS0602375,06,200,B 356 MGS0602388,06,200,A 357 MGS0602390,06,200,A 358 MGS0603494,06,200,B 359 </pre> 360 </div> 361 <div class="section"> 362 <h1><a id="logging-messages" name="logging-messages">Logging messages</a></h1> 363 <p>Start message</p> 364 <div class="line-block"> 365 <div class="line"><br /></div> 366 </div> 367 <p>Successful import message</p> 368 <div class="line-block"> 369 <div class="line"><br /></div> 370 </div> 371 <p>Unsuccessful import message</p> 372 <div class="line-block"> 373 <div class="line"><br /></div> 374 </div> 375 <p>Commit message</p> 376 <div class="line-block"> 377 <div class="line"><br /></div> 378 </div> 379 <p>Final message</p> 380 <div class="line-block"> 381 <div class="line"><br /></div> 382 </div> 383 </div> 384 <div class="section"> 385 <h1><a id="error-messages-in-verdicts-pending" name="error-messages-in-verdicts-pending">Error messages in verdicts.pending</a></h1> 386 <div class="line-block"> 387 <div class="line"><br /></div> 388 </div> 389 </div> 327 390 </div> 328 391 </body> -
WAeUP_Doc/NewDocumentation/ImportNew.txt
r3217 r3218 1 ==================================2 1 Import of data into the portal 3 ================================== 2 ++++++++++++++++++++++++++++++++++ 3 4 4 5 5 General procedure … … 15 15 16 16 17 18 The import form 19 --------------- 20 21 :Filename: 22 Select the file to be imported. This selct box shows all csv files in the import folder 23 :Import Layout: 24 Select the data layout of the import file. 25 26 If the button **Bypass QueueCatalog** is shown, click it! 27 28 Click "Import" to start the import. 29 30 31 Verdicts import 32 ---------------------------------- 33 34 35 The import csv file must have one of these headlines: 36 37 | student_id, current_session, current_level, current_verdict 38 | 39 | matric_no, current_session, current_level, current_verdict 40 | 41 | student_id,matric_no, current_session, current_level, current_verdict 42 43 44 :student_id: 45 the id of the student 46 47 :matric_no: 48 The student's matriculation number. 49 If student_id and matric_no are specified, it is checked, if the student_id 50 and matric_no belong to the same student. 51 52 :current_session: 53 The session key (e.g. 6) or session string (e.g. 2006/2007) the verdict refers to. 54 55 :current_level: 56 The level key the verdict refers to. On probation levels must be specified as 57 level number + 10 or +20 (e.g. 110 for students on first probation). 58 59 :current_verdict: 60 The verdict key from the vocabulary *verdicts*. 61 62 63 Example file:: 64 65 matric_no, current_session, current_level,current_verdict 66 MGS0602342,06,200,B 67 MGS0602346,06,200,A 68 MGS0602350,06,200,B 69 MGS0602360,06,200,A 70 MGS0602375,06,200,B 71 MGS0602388,06,200,A 72 MGS0602390,06,200,A 73 MGS0603494,06,200,B 74 75 76 77 Logging messages 78 ---------------- 79 80 Start message 81 82 | 83 84 Successful import message 85 86 | 87 88 Unsuccessful import message 89 90 | 91 92 Commit message 93 94 | 95 96 Final message 97 98 | 99 100 Error messages in verdicts.pending 101 ---------------------------------- 102 103 | 104 105 106
Note: See TracChangeset for help on using the changeset viewer.