The saga of Table View with multiple Channels…

I ran into some problems when I was documenting this feature for Iguana 6, this is how to fix them.

Background [top]

This is simply a copy of the Viewing generated Tables from Using the Logs>Message View Modes.

You can use Table View with messages from a Source Channel when the Destination Channel uses a To Database destination component. The Table View uses the table definitions from the To Database destination component. If there are multiple Destination Channels, then you can choose which table definitions to use.

Note: A Source Channel forwards data to other channels by using a To Channel destination component. A Destination Channel receives data from other channels by using a From Channel source component.

For example:

  • Data is sent from a Source Channel named llp_to_channel
  • Data is sent to A Destination Channel named channel_to_db
    Note:
    Set the Source Channel in the Source channel properties
  • The Destination Channel channel_to_db uses a To Database destination component
  • Then you can use the database tables definitions in channel_to_db to parse the message sent through llp_to_channel
    Note:
    Table definitions are from the VMD file specified in the To Database component.

Here is an llp_to_channel message parsed using the table definitions in channel_to_db:

If we add a second Destination Channel then we can choose which table definitions to use.

For example:

  • A second Destination Channel named channel_to_db_2 also uses a To Database destination component
  • If channel_to_db_2 also uses llp_to_channel and as its Source Channel
  • Then you can choose the table definition from channel_to_db or channel_to_db_2

Here is an llp_to_channel message showing the choice from a drop-down menu:

Problems [top]

I actually found this very confusing, until I eventually figured out. The key thing I found is that whatever happened it was all caused by the two problems below.

These are the two problems:

  1. Using a VMD file without Table Grammar Root(s) defined, which causes this error:

    Occasionally I got an error dialog with “No available parsers for this message”
  2. Renaming the Destination Channel, which causes the same error.

This means you need to diagnose the problem:

  • If the channel worked before you changed the VMD file you have problem 1
  • If the channel worked before you renamed it then you have problem 2
  •  if you are unsure what happened (like I was when I discovered this problem) simply try both solutions, one of them should work

Why these problems occurred

You don’t actually need to read this section, you can just go straight of the Solutions to fix the problem.

Using a VMD file without Table Grammar Root(s) defined

  • Our documentation tells you that:  “grammar root … is a legacy setting that is not required when using VMD files with Iguana“, unfortunately this seems to be the one occasion where grammar root(s) are required
  • Because grammar roots are no longer required they are not defined in most of our sample VMD files, so if you try this feature with our included VMD files you will probably get an error
  • There are two versions of the demo.vmd file, the old version has grammar roots the new version does not:
    • The original/historical demo.vmd that you will find in the iguana install directory or the other directory – this one has grammar roots defined
    • The updated/expanded version in the other/example directory – this one does not have grammar roots defined
  • When you update the VMD file in a To Database component, it copies the file and renames it to to_database.vmd – which is confusing (if you unaware of it) because it seems to be using the incorrect VMD file

So how I came upon this problem is that when I originally documented this for Iguana 5 I used the old VMD and it worked perfectly (the “new demo.vmd” didn’t exist at that point). Then when I documented it this time I unsuspectingly used the “new demo.vmd” and had all sorts of trouble.

The last point about copying and renaming the VMD file also had me confused for a while, because the channel appeared to be using a different file from the one I expected. Whereas in fact it was using the correct file, it had just copied and renamed it.

Renaming the Destination Channel

  • The to_database.vmd file used by a To Database component IS stored in the <channel>/assets directory:
  • When you rename a To Database component the <channel>/assets directory is removed:
  • Unfortunately adding the VMD file back by using the channel properties doesn’t work
    • It turns out that both the assets directory and the to_database.vmd file are required for this to work correctly
  • If you rename your channel from “channel to db” to “channel_to_db” (or vice versa), then Iguana doesn’t remove the assets directory.
    • This is because Iguana replaces spaces in the Channel name with underscores in the directory name – and therefore the channel directory name is unchanged
    • So it appears that the assets directory is only removed when the channel directory name is changed

Of course I fell headlong into the renaming trap!  Initially I changed my channel name from “channel to db” to “channel_to_db” (I often substitute/remove underscores like this) and it worked perfectly. But later when I chose to change a channel name from “channel_to_db_2” to “channel_to_db_3” the issue occurred (which was very confusing until I sorted it out).

Solutions [top]

Even if you symptoms seem different one of these solutions will probably work.

Using a VMD file without Table Grammar Root(s) defined

  1. Double click on the to_database.vmd file for your channel to open it with Chameleon:
  2. Check if Grammar Roots are defined:
  3. Create Grammar Root(s) if required:
    • Click the Grammar Root ellipsis “…”
    • Choose the appropriate segment
    • And click OK
    • This is the result, the warnings do not cause a problem:
  4. Save the file and close Chameleon

Note: Chameleon only works on Windows, if you’re using Mac or Linux you can install Chameleon on a virtual machine.

Renaming the Destination Channel

  1. When you rename a To Database component the <channel>/assets directory is removed:

  2. Note: Adding the VMD file back by using the channel properties doesn’t work (this was the first thing I tried)
  3. You actually need to “manually” recreate both the assets directory and the to_database.vmd file, the easiest way to do this is to copy the message directory from another To Database channel.
  4. Note: At this point your assets directory probably contains the wrong to_database.vmd file, so you will need to update it.
  5. You can now use the channel properties to load the correct VMD file.

 

 

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.