- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Table Response Map - with some empty col
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-22-2009 08:05 AM
I'm working with different table outputs that will contain empty elements in any of the columns. I want to have a generic response map (using delimiter and not column width) to parse any such table with different number of columns in each of the tables. Could someone help me out.
E.g:
1)
IP port tag status
----------------------------------------
1.1.1.1 80 UP
1.1.1.2 80 v1 UP
2)
Name ID key time group status
--------------------------------------------------
user1 user1 1234 12:45 ONLINE
user2 user2 1235 G1 ONLINE
Re: Table Response Map - with some empty col
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-22-2009 08:31 PM
Using a delimiter will give you incorrect results because your delimiter here is 'space' and it is ambiguous which column values align to which column if you want to split your row using 'spaces'. I would suggest using column width for this response unless you know for sure that column width is not going to work well for this response (e.g. column values overflow into another column). Even in those cases, I think there options on columns in the table map which allow you to define the column parsing in such a way that one can "steal" characters from the next column.
If all table mapping options fail, you can finally use "pattern map" to define a custom regex which can account for appropriate columns being missing (but in my personal opinion, those are harder regexes to write). So I would give table mapping with fixed width a try first and see if it works for you.
Re: Table Response Map - with some empty col
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-22-2009 10:17 PM
Column width works fine for this sample. I have a query: Defining column width based on header makes sense or based on relative column values?
I have tried with many samples by tailoring the response; sometimes, it cuts the value.
Hence, column width demarcation plays a vital role in these kind of responses!
Re: Table Response Map - with some empty col
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-22-2009 10:46 PM
