Download presentation
Presentation is loading. Please wait.
Published byCarrie Hedden Modified over 10 years ago
1
Aspen Import Tool TEC05 Liz Lucchese
2
Agenda Overview Anatomy of an import Using the examples References Tips & tricks for working with text files
3
Overview Underlying technology shared with exports, procedures, and reports Requires finding the Object Identifier (OID) for the desired table, as well as the OID for each field in that table User input screen XML and/or Java definition Runs in the Job Queue
4
Anatomy of an Import A standard import has just two components: File to be imported XML definition © 2007, All Rights Reserved Text file to import “100”,“10017”,“Joe” “101”,“23007”,“Jill” “102","58092”,“James” XML definition
5
Anatomy of an Import Update the Student table. Text file does not include quotes.
6
<import Then let’s choose our table Table- id=“tblStudent” This field (labeled as the object identifier) can be found in the details of the database table in the Data Dictionary. mode=“update, insert, or both” value- delimeter= value-wrapper= force= Let’s dissect our first line in our import:
7
Anatomy of an Import An import definition allows pre-import criteria to be set: For importing Ref Table values, you must select the Ref Table. For importing test scores, you must select the test definition. Text file to import “100”,“10017”,“Joe” “101”,“23007”,“Jill” “102","58092”,“James” XML definition Import definition
8
Example 1 – Reference Code Import Importing new reference codes into a table: Import your file! © 2007, All Rights Reserved
9
Example 1 – Reference Code Import Your results should look something like the following: Import Results ============== File: sample-data-reference-codes.csv Records matched: 0 Records updated: 0 Records inserted: 120 Records skipped: 0 ----------------------- Total records: 120 © 2007, All Rights Reserved
10
© 2007, All Rights Reserved Inserting Student Fee Records
11
Your results should look something like the following: Import Results ============== File: newfees.txt Records matched: 0 Records updated: 0 Records inserted: 0 Records skipped: 165 ----------------------- Total records: 165 Invalid Records =============== Line 1: Could not find a unique match for the related OID Line 2: Could not find a unique match for the related OID Line 3: Could not find a unique match for the related OID Line 4: Could not find a unique match for the related OID © 2007, All Rights Reserved
12
What Happened?!
13
Let’s review our XML Definition for possible errors
14
Example 3 – Student Program Import Importing Student Programs © 2007, All Rights Reserved
15
References BKF04 – Introduction to XML course materials Import samples with data in the samples folder http://www.w3schools.com/xml/default.asp XML Document Type Definitions (DTDs) in the samples folder: import.dtd filter.dtd tool-input.dtd © 2007, All Rights Reserved
16
Tips & Tricks for working with text files TextPad and Notepad++ both have out-of-the-box syntax coloring for XML files Notepad++ allows XML tag blocks to be expanded and collapsed Both allow "block highlighting" using the ALT key when clicking and dragging This allows you to highlight a column and delete it, much like you would in Excel © 2007, All Rights Reserved
17
Tips & Tricks for working with text files TextPad allows search and replace (Search menu -> Replace, or CTRL+H) to take a text file without quotes and easily add them Replace all instances of a comma with "," Replace all instances of a line feed \n with "\n" using Regular expressions Add a final double-quote to the start of the very first line, and you have all text wrapped in double-quotes!! © 2007, All Rights Reserved
18
Thank you! elucchese@x2dev.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.