VERIFIED SOLUTION i

Resolve insufficient string length during DataMart creation process in Portrait Foundation

Product Feature: Data mart

Issue

Running the Portrait Foundation DataMart (DM) Creation Tool fails with the following error:

DataMart Creation failure error

Examining the amc_dm_table_sql table - and ordering by the sql_order field - shows one or more rows that appear to be missing the first part of their SQL statements and instead, only have a collection of field names and types.
 

Cause

There used to be an historical limitation as to the maximum length of a varchar or nvarchar data type in SQL Server. As a result, the longest scripts that generate DataMart objects used to need to be broken into manageable chunks and split across multiple rows, and then reconstituted before they were parsed and executed by the DM framework.

This limitation is no longer present, and so this chunking can be removed. This work was completed in the past, but one small aspect surrounding table creation was missed.
It was discovered that the chunking code for the table creation did not work correctly, but was very unlikely to cause a problem.

However, Configurable Business Entities (CBEs) that have significant numbers of attributes and several levels of hierarchical depth, can result in table creation scripts that are too long and result in the error above.
 

Resolution

UPDATED: April 12, 2017
This issue has been fixed in several code streams and can be found as a patch called TFS-34098.
The same patch can safely be used across all of the code streams listed in the patch's ReadMe.txt file.