Skip to main content
Implemented

Pass underlying table DW_SourceCode thru View

  • June 15, 2018
  • 3 replies
  • 1 view

Forum|alt.badge.img

I loaded some records from a view which obviously is built off of a table. When I looked at the records in the destination table, the DW_SourceCode field had the value 'View'. I was expecting the underlying DW_SourceCode field from the source table.
Response from TX: The current behavior of custom views is to simply populate the destination table DW_SourceCode with the value "View." Unfortunately, you can't map any field onto DW_SourceCode in the destination table, but you can add it as an additional custom field.

This feature would be nice for tracking and being able to query the underlying source dataset.

3 replies

Forum|alt.badge.img

Thumbs up! Encountered this as well.


simple feature I guess ...


Hi all, 

This ticket was from some time ago, however, I am not sure that Jan's solution is optimal. Using a table insert from a view is less logical than dragging a view to a table in a succeeding database. 

To that end, I have discovered that (at least in version 20.10.11.64), adding a field DW_SourceCode to the source (custom) view will populate the succeeding table with the values in that column.

So, for example 'SELECT DW_SourceCode as DW_SourceCode from SourceTable' in a view, will populate the DW_SourceCode values from the source table into the destination table. 

 

Kind regards,

Andrew