Skip to main content
SUBMITTED

Set mapping by default to valid table

  • March 20, 2020
  • 6 replies
  • 13 views

bas.hopstaken
TimeXtender Xpert
Forum|alt.badge.img+5

When creating a custom table insert, when you map some tables to the parameters. By default the Raw table is mapped.

Normally I always use the Valid table. Please map the Valid table by default instead of the Raw table.

Or maybe create a project setting which allows you to set the default mapping (Valid of Raw). 

6 replies

peter.jensen
TimeXtender Xpert
Forum|alt.badge.img+3
  • TimeXtender Xpert
  • March 20, 2020

yes please !


Forum|alt.badge.img
  • Contributor
  • March 23, 2020

And when "suffix valid tables" is selected as a project option, name it <table name>_V as well.

That way you can easily test in SSMS or other SQL scripting tools and just paste it onto TX.


bas.hopstaken
TimeXtender Xpert
Forum|alt.badge.img+5
  • Author
  • TimeXtender Xpert
  • March 23, 2020

Hi CalmCo support,

It is possible to see the actual SQL query. When you click the 'Show translation' option. See below.

hwfNPmvlZ1IPXDqj8tbEgw.png

This is the code you can copy to SSMS. 


Forum|alt.badge.img
  • Contributor
  • March 23, 2020

Learned a new thing today, thanks!


  • April 3, 2020

This setting has be shifting back and forth over the years because sometimes new developers have a hard time understanding the specifics of the TX data cleansing process. So most of the time we get less errors setting this to raw (for self-referencing views) to do look up.

But with other changes in mind could we (meaning you guys) come up with some rules that would allow the system to pick the right table but it self?


Forum|alt.badge.img
  • Contributor
  • April 3, 2020

I think you have to adhere to the way TimeXtender works behind the scenes.

So when dropping a table on the views I would create two parameters: one for raw and for valid that follow the table names as they are present in the stage or dwh database, taking into account the prefix and suffix settings

I.e. if you have set suffix valid table to yes you get two parameters:

[tablename_R] for raw and [tablename_V] for the valid table. I would also reference them that way in the Object Name/Value column.

For custom scripting I would do the same. If you drag the table into the script create _R and _V parameters and let the user delete the one he doesn't need.

When right clicking on a table don't offer the option "Add Parameter" but offer three options: Add as Raw table, Add as Valid table, add both.

That way you clear up all confusion.