Products
  
  
  Crash Magic Online
  
  Intersection Magic
  
  Map Magic
  
  Knowledge Base
  
  
  
  Contact Us
  
  Meeting
  
  Shop
  
  Login
  

 

Knowledge Base Article:CMO308 


Registration keys moved to client area: Select login on the left menu bar.

Knowldegebase:
Search home page  

Importing new crash data - XML

Article created: Mar 28 2018, updated: Mar 28 2018

Background:  Crash data can be imported from many sources. This article describes the case where the data is provided as an XML file.

If your data is being provided in XML format, you also have the option to FTP the data to our servers rather than using the browser interface.  That process is described in http://www.pdmagic.com/kb/ShowKBArticle.cfm?id=301


Status:  Info - "how to" article
Keywords:  Import,XML,Upload
Categories:   *Importing* *Data*

Explanation:
When crash data is provided as an XML file, or group of files, the following steps are taken:
  1. Zip the XML file(s)
  2. Upload the zip file to Crash Magic
  3. Begin processing the import

The steps for completing this process follow.



Solution:
  1. If your XML data files are not already zipped, create a zip file and add them to it.  Do not add any folders, or any other files to the zip.  An easy way to accomplish this is to use the Windows Explorer. 
    • Locate the required files and hold down the CTRL key while selecting each of them. 
    • With the desired files selected, place your cursor over any one of them. 
    • Click with the right mouse button and choose "Send to..". Then choose "Compressed (zipped) folder". 
    • A new file will be created and selected.  It is usually a good idea to rename it.
    • This is the Zip file you will upload to the "Import XML data" page.
  2. Log in to Crash Magic as an administrator. 
    • Proceed to www.GovernmentTools.com.
    • Enter your login information and select your user group.

    • Click the "Show advanced options" link below the logo of your agency.  New buttons and links will become available.

    • Select the "Group Admin" button.
  3. Navigate to your user group "Import XML data" screen
    • When you have successfully logged in, you will be presented with the administrator console.  In the tree on the left, locate the user group for your agency.  It will be your state abbreviation @ your agency. (i.e. CA@LakeForest) It will usually be the last user group in the list.    Click on your user group name to select it.
    • On the page for your agency, there will be a number of tabs across the top.  Locate "Import XML data" and select it.

  4. Proceed with converting the data to XML
    • In the "Select DB to XML definition" list, select the appropriate convert definition.  There may be a couple in there, so look them over. The standard converter for SWITRS is "SWITRS ASCII to XML".  
    • Click the "Browse" button and locate the zip file that you created earlier.  Select that file.
    • Now click the "Upload to queue" button and the file will be uploaded.
    • When you see the file in the box on the left, press the "Begin processing" button.  This will start a process that will read your ASCII file and create a new XML file for each crash record found.  Those files will appear in the list on the right, labeled "XML Output files". 
    • You will see a box titled "Threads currently processing". You can click the blue arrow below it to cause it to update.  Wait until it finishes and the converting message is gone.
  5. Import the XML files
    • Locate the tab titled "Import XML data" and select it.
    • In the "Select XML to DB definition" list, choose the import definition that matches your data source.  There will usually be one that identifies the name of your data source.  Some configurations include an option to overwrite existing records or to skip over existing identical records.  For most agencies, the default is to overwrite existing records. (This is the default if you don't have both options)
    • Locate the "Browse" button below the "Select ZIP containing XML files to add to queue" prompt.  Select it and locate the ZIP file that you created above.
    • Select the "Upload to queue" button.
    • Upon upload completion, the "Files in queue for import" will show the XML files that have been extracted from your ZIP file.
    • Select the "Begin processing" link to start the import.
    • The box at the bottom showing "Threads currently processing" will display progress.  The blue button below it can be used to update the status. (please give the status a few minutes to calculate it's percent and time to completion)
    • When the "Threads currently processing" box is empty, the import is complete.
  6. Check your status
    • You can check the results of the most recent, or any other import in the "import history" box.  Each entry includes the date and time of the import, as well as a brief summary in the box to the right.
    • You can also click on the "Basic log" link for a more detailed description, especially if the summary indicates that errors have occurred.
    • Any of the reports in the program will reflect this new data.  In addition, you should be able to find a query in the administrator panel called "Crashes by year".  It will be located either in your own user group, or the one above it, under the ".shared" user, in the "Query - General" section.  The blue tab of this report can provide you with a quick, simple summary of the data in your system. Note: you must put a * in the designated location, and press the database button as shown below:



November 20, 2018 11:11AM

© 1999-2018 Pd' Programming, Inc - Lafayette, CO USA