Service Mapping: Create an empty table (or alternative approach)

Brent Sutton
Mega Sage

Hi All,

I've got an issue where I need to create an empty table before using a "transform table" step to add the columns and populate the contents of the table.

I've been unable to work out how to create an empty table so as a workaround I've parsed an existing variable into the table I want to create and then add the remaining table variables in the following step. This works fine but doesn't work well from a readability perspective.

In a perfect world, I would create and populate the table in one step. I haven't worked out a way to do this as most of the values I need are temporary variables.

See current pattern steps below:

Step One:

find_real_file.png

Step Two:

find_real_file.png

Any suggestions around how to create an empty table or suggestions around alternative methods would be much appreciated.

Brent

1 ACCEPTED SOLUTION

Brent Sutton
Mega Sage

I managed to work out how to create an empty table in the end.

  1. Create a step using the "union tables" operation.
  2. Set the first, second and target table parameters with the same table name.

This results in an empty table being created.

find_real_file.png

Hope this information helps anyone that had the same issue.

Brent

View solution in original post

8 REPLIES 8

Tony Chatfield1
Kilo Patron
Hi, perhaps you could clarify exactly what you are trying to achieve? There should be no need to add extra tables/fields prior to a transform and your data should be mapped by field or by script within the transform process.

robertgeen
Tera Guru

I agree with Tony on this we will need more information as there shouldn't be any reason to create an empty table before hand. Can you please tell us what the reason for that is?

Brent Sutton
Mega Sage

Hi Tony / Robert,

Thanks for coming back to me.

I've got a bunch of temporary variables (created automatically by service mapping) that I am mapping to attributes in the CI I wish to populate.

Instead of setting them one by one I'm bringing them into a temporary table and using a transform table to populate all the target CI attributes in a single step (see screenshot):

 

The issue I have is that I can't create the $appinfo temporary table on the fly. It needs to have been created in advance of the transform table step.

I'm open to other methods to achieve the same outcome with the aim to minimise the number of steps required. The temporary variable values that I need to reference are in the computer_system, entry_point and process sections.

Hope this makes sense?

 

Brent

 

It's been a while since I've played in the pattern world but couldn't you just do a set step before this with an empty value to create the table? I'm sure there's a way to do it in 1 step but honestly if it's giving you problems that's what I would do. Just do a set value step with the table name and a value of blank and it should work.