RE: In 4.1 version TPT script is failing with field length overflow, where as the same stream in running fine in 3.7 version

In TPT, schema definition section, some attributes size in Diyotta 3.7

DEFINE JOB INSERT_TGT_TDNW101_RISE_PRICE_PLAN_REF_STG (

DEFINE SCHEMA TGT_TDNW101_RISE_PRICE_PLAN_REF_STG_SCHEMA

(

PRICE_PLAN_CD VARCHAR(2000)

,CUST_SYS_CD VARCHAR(4)

,STRTGC_PLAN_NAME_CD VARCHAR(11)

,STRTGC_PLAN_NAME_DES VARCHAR(2000)

,PRICE_PLAN_FMLY_CD VARCHAR(11)

,PRICE_PLAN_FMLY_DES VARCHAR(2000)

….. );

and in Diyotta 4.x, for the same columns, it is defined as-

DEFINE JOB INSERT_TGT_TDNW101_RISE_PRICE_PLAN_REF_STG (

DEFINE SCHEMA TGT_TDNW101_RISE_PRICE_PLAN_REF_STG_SCHEMA

(

PRICE_PLAN_CD VARCHAR(20)

,CUST_SYS_CD VARCHAR(4)

,STRTGC_PLAN_NAME_CD VARCHAR(100)

,STRTGC_PLAN_NAME_DES VARCHAR(50)

,PRICE_PLAN_FMLY_CD VARCHAR(100)

,PRICE_PLAN_FMLY_DES VARCHAR(50)

….);

Now we are getting error during TPT load, for highlighted column as the size for this column defined as varchar(50) in TPT schema definition.

In database, for this column the size is defined as varchar(50) but in TPT schema definition section, we set the size something extra.

Want to know, how Diyotta set these attributes size in TPT and they need to change in configuration.

ERROR: Field length overflow(s) in record 80261, field 4, ‘MODEL_NME’. Expected 25 bytes, field contained 27 bytes.
TGT_TDNW102_RISE_WRLS_DEV_STG_SOURCE[1]: TPT19015 TPT Exit code set to 12.

JohnGS Advanced User Asked on July 21, 2020 in Diyotta Monitor.
Add Comment
1 Answers

We have provided a fix in the later releases of 4.1 version and this issue is being handled as part of 4.1.0.3118.005

In 4.1 version if Teradata table is chosen as a target in the dataflow. TPT script is created on the basis of Teradata target tables. so to overcome this issues of data overflow. We have updated the script to generate the TPT schema with varchar(2x) x – being the precision of the target table with precision less than 1000.

Target table Definition:

CREATE MULTISET TABLE Q1H_WORK_TBLS.TDNW101_RISE_PRICE_PLAN_REF_STG ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
PRICE_PLAN_CD VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
CUST_SYS_CD CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
STRTGC_PLAN_NAME_CD SMALLINT NOT NULL,
STRTGC_PLAN_NAME_DES VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
PRICE_PLAN_FMLY_CD SMALLINT NOT NULL,
PRICE_PLAN_FMLY_DES VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
PRICE_PLAN_CAT_CD SMALLINT NOT NULL,
PRICE_PLAN_CAT_DES VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
PRICE_PLAN_AAP_TYPE_CD BYTEINT NOT NULL,
PRICE_PLAN_AAP_TYPE_DES VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
ACCS_CHG_AMT DECIMAL(9,2) NOT NULL,
CELL_MIN_QTY INTEGER FORMAT ‘9(9)’ NOT NULL,

TPT script:

DEFINE JOB INSERT_TGT_TDNW101_RISE_PRICE_PLAN_REF_STG (
DEFINE SCHEMA TGT_TDNW101_RISE_PRICE_PLAN_REF_STG_SCHEMA
(
PRICE_PLAN_CD VARCHAR(40)
,CUST_SYS_CD VARCHAR(4)
,STRTGC_PLAN_NAME_CD VARCHAR(100)
,STRTGC_PLAN_NAME_DES VARCHAR(100)
,PRICE_PLAN_FMLY_CD VARCHAR(100)
,PRICE_PLAN_FMLY_DES VARCHAR(100)
,PRICE_PLAN_CAT_CD VARCHAR(100)
,PRICE_PLAN_CAT_DES VARCHAR(100)
,PRICE_PLAN_AAP_TYPE_CD VARCHAR(100)
,PRICE_PLAN_AAP_TYPE_DES VARCHAR(100)
,ACCS_CHG_AMT VARCHAR(100)
,CELL_MIN_QTY VARCHAR(100)
,CELL_MIN_OVRG_RATE_AMT VARCHAR(100)
,DRCT_CNCT_MIN_QTY VARCHAR(100)
,DRCT_CNCT_OVRG_RATE_AMT VARCHAR(100)
,LD_FREE_INDCR VARCHAR(4)
,SALS_EFF_DT VARCHAR(10)
,SALS_XPIRN_DT VARCHAR(10)
,UPDT_PRCS_CD VARCHAR(16)
,LST_UPDT_DT VARCHAR(10)
Expert Answered on July 28, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.