Quantcast
Channel: Teradata Forums - Tools
Viewing all 4252 articles
Browse latest View live

Teradata tools in VMWare Teradata Express - response (1) by amittera

$
0
0

Please  help on the above concern , as  i am on the same track.


Teradata tools in VMWare Teradata Express - response (2) by sgarlapa

Mload error while using Update/Insert for null PI fields - response (1) by krishaneesh

$
0
0

NULL value comparision seems to be causing the issue here. To avoid this try to use coalesce.

Issue while loading space delimited flat file using fastload on TPT - response (6) by krishaneesh

$
0
0

Is the original file a tab delimited? Replace the space in the file with a comma and try. Also modify the VARCHAR textdelimiter=',' and try.

Issue while loading space delimited flat file using fastload on TPT - response (7) by feinholz

$
0
0

Please provide a sample of the data after making the modifications to it so that only a single space separates each field.
 

Teradata TPT Error :: TPT10508: RDBMS error 3812: The positional assignment list has too few values. - forum topic by aneelkumar04

$
0
0

Hi,
When i ran the TPT script i got below error.
LOAD_OPERATOR: connecting sessions
EXPORT_OPERATOR: connecting sessions
LOAD_OPERATOR: preparing target table
LOAD_OPERATOR: entering Acquisition Phase
LOAD_OPERATOR: TPT10508: RDBMS error 3812: The positional assignment list has too few values.
Am using Source as Teradata View
Target : Teradata table.
( show sel * from  table tablename-- 179 rows( view)
  Help table tablename -- 178 rows(table))
when i ran the above queries on source tables i got like this.
Thanks
Anil
 
 
 

Forums: 

Teradata TPT Error :: TPT10508: RDBMS error 3812: The positional assignment list has too few values. - response (1) by krishaneesh

$
0
0

The view might be having an additional column which is not existing in the table. might be a calculated value. Please select specific columns from the view.

Fastload Utility Locks due to abort- .FILLER command- possible solution? - forum topic by Dominiq

$
0
0

While using utilities like Multiload, when any job ends abnormally, Teradata still holds locks and we get error 'Table is being mLoaded'.
While in case of FastLoad/TPT end, we get error 'Table is being loaded'. Even after dropping error/log/work tables, we still get same error. What I do now is just drop these tables, and recreate them.
Possible solution(read on forum) is to run same process again with empty file. So utility puts lock, and releases after successful completion.
 
Instead of that, can we use .FILLER command in fastload script so process will run without empty file, but with all empty columns and will release lock later once finished successfully?FILLER will exclude columns from loading and it should release locks.

Forums: 

Fastload Utility Locks due to abort- .FILLER command- possible solution? - response (1) by krishaneesh

$
0
0

The filler command is used to when you do not want to load a particular field but why do you want to use the columns and complicate the script. Theoretically speaking it might be possible but a much simpler approach would be to build another script as:
.logon TDPID/username,password;
begin loading databasename.targetname errorfiles dbname.err_table1,dbname.errtable2
endloading;
.logoff;
Note that the error tables in your original script and this one should be the same. for MLOAD failiure depending on the phase it failed, you can use the statements:
release mload on dbname.tablename; or release mload on dbname.tablename in apply;

Retrieve password from SQL Assistant - forum topic by vganti

$
0
0

I use SQL assistant to connect to Teradata. However, I forgot my password now and cannot connect to Teradata using BTEQ. Can someone help me with retrieving my password from SQL Assistant.
 
thanks,
venky

Forums: 

BTEQ Parallel Execution to speed up executing SQL statements - forum topic by muthu1802

$
0
0

Currently I am executing SQL statements one by one as below,

bteq << EOB
.logon XXXX
.OS rm -f  file.sql
.SET FORMAT OFF
.SET TITLEDASHES OFF
.SET WIDTH 999
.export data file=file.sql
.SET RECORDMODE OFF;

SQL statement1;
SQL statement2;
SQL statement3;
SQL statement4;
SQL statement5;
SQL statement6;
SQL statement7;
SQL statement8;
SQL statement9;
SQL statement10;


.export reset
.EXIT ERRORCODE
EOB

 
and it is taking more time.
Is there any way we can speed up the execution by making the execution process parallel in BTEQ.
 

Forums: 

TPT Error using DATACONNECTOR PRODUCER Operator - forum topic by Jugalkishorebhatt1

$
0
0

Hi All,
Please help me where I am going wrong. The error im getting is relating to the FileName given.
This is the First time i am using TPT.
Below is the TPT Script:
 
DEFINE JOB FlatJOBS
DESCRIPTION 'FLAT FILE FORMAT'
(
DEFINE SCHEMA Schemas
DESCRIPTION 'Schemas'
(
EmpId INTEGER,
EmpName VARCHAR(10)
);

DEFINE OPERATOR FlatOp
DESCRIPTION 'Schemas'
TYPE DATACONNECTOR PRODUCER
SCHEMA Schemas
ATTRIBUTES
(
varchar FileName='/home/jugal/Flat.txt',
varchar OpenMode='Read',
varchar FORMAT='FORMATTED'
);
DEFINE OPERATOR LoadOp
DESCRIPTION 'LoadOp'
TYPE LOAD
SCHEMA Schemas
ATTRIBUTES
(
    VARCHAR PrivateLogName = 'DB.employees_trg_log',
    INTEGER MaxSessions    = 32,
    INTEGER MinSessions,
    VARCHAR TargetTable    = 'DB.MLOAD_INPUT_INSERT',
    VARCHAR TdpId          = 'jugal.dev.com',
    VARCHAR UserName       = 'jbhatt',
    VARCHAR UserPassword   = 'jugal',
    VARCHAR ErrorTable1    = 'DB.employees_ERRTABLE1_ap',
    VARCHAR ErrorTable2    = 'DB.employees_ERRTABLE2_ap',
    VARCHAR LogTable       = 'DB.employees_LOGTABLE_ap'
);
APPLY
('INSERT INTO DB.MLOAD_INPUT_INSERT (:EmpId,:EmpName)')
TO OPERATOR(LoadOp [4])
SELECT * FROM OPERATOR (FlatOp);
);
 
Below is how i gave the data FileName
Flat.txt:
100,'Jugal'
101,'Bhatt'
 
Logs:
 
$ tbuild -f FlatEmp.txt
Teradata Parallel Transporter Version 14.00.00.08
Job log: /opt/teradata/client/14.00/tbuild/logs/jbhatt-354.out
Job id is jb956714-354, running on urh00022.jugal.com
Found CheckPoint file: /opt/teradata/client/14.00/tbuild/checkpoint/jbhattLVCP
This is a restart job; it restarts at step MAIN_STEP.
Teradata Parallel Transporter FlatOp: TPT19006 Version 14.00.00.08
FlatOp: TPT19008 DataConnector Producer operator Instances: 1
Teradata Parallel Transporter Load Operator Version 14.00.00.08
LoadOp: private log specified: UI_RESULTS_DB.employees_trg_log
FlatOp: TPT19003 ECI operator ID: FlatOp-1169
FlatOp: TPT19222 Operator instance 1 processing file '/home/jugal/Flat.txt'.
LoadOp: connecting sessions
LoadOp: preparing target table
LoadOp: entering Acquisition Phase
FlatOp: TPT19350 I/O error on file '/home/jugal/Flat.txt'.
FlatOp: TPT19416 pmRead failed. Unexpected data format (16)
FlatOp: TPT19305 Fatal error reading data.
FlatOp: TPT19221 Total files processed: 0.
LoadOp: disconnecting sessions
LoadOp: Total processor time used = '2.01 Second(s)'
LoadOp: Start : Wed Mar 26 14:47:21 2014
LoadOp: End   : Wed Mar 26 14:47:25 2014
Job step MAIN_STEP terminated (status 12)
Job jbhatt terminated (status 12)
 
 
 
 

Tags: 
Forums: 

BTEQ Parallel Execution to speed up executing SQL statements - response (1) by sgarlapa

$
0
0

You can try as below set more sessions and as a multi statment request -
.set sessions 8;

SQL statement1

;SQL statement2

;SQL statement3

;SQL statement4

...etc

;SQL statement10

 

Retrieve password from SQL Assistant - response (1) by krishaneesh

$
0
0

The password might have expired.  Please contact your DBA and he can reset your password.

BTEQ Parallel Execution to speed up executing SQL statements - response (2) by krishaneesh

$
0
0

@SriLaxmi, I do not think this will make the sql's run in parallel. instead it will increse the number of sessions connecting to Teradata and will execute each query faster.
@Muthu: Are the sql's interdependant like the output of the preceding query becomes the input for the current query etc.. If not then create multiple BTEQ scripts with single sqls and you can call all of them in a Shell script in parallel.


TPT Error using DATACONNECTOR PRODUCER Operator - response (1) by krishaneesh

$
0
0

is the header existing in the file supplied.EMPID not being an integer might be causing the issue.

Data not loaded into table even the log doesn't have any error. - forum topic by srinu_nistala

$
0
0

Hi Team,

The dat file impac/db/td/table/_report_format/gem_gq_report.dat is not getting loaded to the report format table.

I don’t see any errors in the code release log as well.
Please find the log below - release.20140325_000413.impac.sgpla806_impac_63992-2014-03-24.tar.01787.log

+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-
.import vartext '^A' file = "impac/db/td/table/_report_format/gem_gq_report.dat";
+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-
.repeat *;
+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-
using (
app_nm varchar(32000),
market_cd varchar(32000),
report_typ varchar(32000),
field_nm varchar(32000),
file_typ varchar(32000),
field_size_delim varchar(32000),
field_order varchar(32000)
)
insert into impac_data._report_format (
app_nm,
market_cd,
report_typ,
field_nm,
file_typ,
field_size_delim,
field_order
)
values (
:app_nm,
:market_cd,
:report_typ,
:field_nm,
:file_typ,
:field_size_delim,
:field_order
);
*** Starting Row 0 at Tue Mar 25 19:19:16 2014

*** Warning: Out of data.
*** Finished at Tue Mar 25 19:19:16 2014

*** Total elapsed time was 1 second.

Please find the data in the dat file.

GEM^AALL^AGEM_GQ_RPT^Ase10^AH^A4^A1^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A2^A
GEM^AALL^AGEM_GQ_RPT^Agms_tooc_se10^AH^A13^A3^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A4^A
GEM^AALL^AGEM_GQ_RPT^Adba_nm^AH^A6^A5^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A6^A
GEM^AALL^AGEM_GQ_RPT^Acurr_total_tickets^AH^A18^A7^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A8^A
GEM^AALL^AGEM_GQ_RPT^Acurr_gq_total_tickets^AH^A21^A9^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A10^A
GEM^AALL^AGEM_GQ_RPT^Acurr_per_gq_trans^AH^A17^A11^A
GEM^AALL^AGEM_GQ_RPT^A,^AH^A1^A12^A
GEM^AALL^AGEM_GQ_RPT^Aprev_total_tickets^AH^A17^A13^A

Can you please check this and let me know your inputs.
Please let me know if you need more details.

Forums: 

TPT Error using DATACONNECTOR PRODUCER Operator - response (2) by Jugalkishorebhatt1

$
0
0

Hi Krishhan,
 
Below is the DDL:
 
CREATE MULTISET TABLE DB.MLOAD_INPUT_INSERT ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
      Empid INTEGER,
      EmpName VARCHAR(5) CHARACTER SET LATIN CASESPECIFIC)
PRIMARY INDEX ( Empid );
 

split file in two - forum topic by jordyx18

$
0
0

use strict;

use Getopt::Long; 

use English;

use CWD;

use Tie::File;

use warnings;

 

my $HomeDir="C:\\DDL";

my $ConfigFile = $HomeDir . "\\" . "Conf.txt";

my $RunFolder = $HomeDir . "\\Ods";

my $OutFile = $HomeDir . "\\" . "OutPut.csv";

my $dir;

my $TempDir = "C:\\DDL\\Temp";

my %ConfigVar;

my $ParentName = 'Parent Name';

my $ChildName = 'Child Name';

my $SNO= 'S.NO';

my @FileArray;

my $char = '(';

 

 

##################################################################

# Name:ReadConfigFile

# Description:Reading config files

# Inputs: $1=

# Return Code 0

####################################################################

sub ReadConfigFile {

my @ConfigArray;

 

# Open the file.

open(INFILE, $ConfigFile) or die "Cannot open $ConfigFile: $!.\n";

 

while(my $l = <INFILE>) 

{

chomp($l);

@ConfigArray = split(/=/, $l);

$ConfigVar{$ConfigArray[0]} = $ConfigArray[1];

}

close INFILE;

 

}

##################################################################

# Name:GetFilesCount

# Description: Counting the number of files in the folder

# Inputs: $1=

# Return Code 0

####################################################################

sub GetFilesCount

my @files = <$dir/*>;

my $count = @files;

print "Total Number of files present in Folder ".$dir." = ".$count."\n\n";

 

}

 

##################################################################

# Name:CountNoFileinFolders

# Description: Counting the number of files in the folder

# Inputs: $1=

# Return Code 0

####################################################################

sub GetFilesName

 

  my $fileName='';

  my $count;

  foreach my $fp (glob("$dir/*")) 

  { # looping file one by one

  $count = 0;

 open my $fh, "<", $fp or die "can't read open '$fp': $OS_ERROR";

 $fileName = $fp;

  while (<$fh>) # Reading file 

  {

chomp($_);

    if ($_ =~ m/(^|(\s)+)create procedure(\s)+/i or $_ =~ m/(^|(\s)+)replace procedure(\s)+/i)

{

$count++;

}

  }

 

  if($count = 1)

  {

print $fileName."\n";

CreateTempFiles($fileName);

  }

  if($count > 1)

  {

CreateTempFiles($fileName);

  }

   close $fh or die "can't read close '$fp': $OS_ERROR";

  }

 }

 

 

###########CreateTempFiles#######################################################

# Name:CreateTempFiles

# Description: For a single file it will break files in parts

# Inputs: $1=

# Return Code 0

####################################################################

sub CreateTempFiles

{

 my $ProcName;

 my $linenumbers = 0;

 my $Lastline = 0;

 my $LL;

 my $LLN;

 my $files ;

 open my $fh, "<", $_[0] or die "can't read open '$_[0]': $OS_ERROR";

 while (<$fh>) # Reading file 

chomp($_);

if ($_ =~ m/(^|(\s)+)create procedure(\s)+/i or $_ =~ m/(^|(\s)+)replace procedure(\s)+/i) 

{

   my $ObjectName = $_;

$ObjectName =~ /\./g;

$ObjectName = $';

$ObjectName =~ s/^(\s|\t)+//g;

$ObjectName =~ /(\s|\(|$)/g;

$ObjectName = $`;

$ObjectName =~ s/(\.|\"|\s|\()//g;

$files = "${TempDir}\\${ObjectName}.sql";

open(OUTFILE, ">", $files) or die "Cann't open $files : $!.\n";

 }

print OUTFILE $_."\n";

}

close $fh or die "can't read close '$_[0]': $OS_ERROR";

}

 

 

##################################################################

# Name:ReadFile

# Description: Counting the number of files in the folder

# Inputs: $1=

# Return Code 0

####################################################################

sub ReadFileX

{

my $CallCount = 0;

  $ParentName = "";

 

 

foreach my $fp (glob("$TempDir/*")) 

    { # looping file one by one

open my $fh, "<", $fp or die "can't read open '$fp': $OS_ERROR";

    while (<$fh>) # Reading file 

{  print "test1\n";

chomp($fh);

print "$fh \n";

 

if ($fh =~ m/(^|(\s)+)create(\s)+/i or $fh =~ m/(^|(\s)+)replace(\s)+/i)

{

$ParentName = $fh;

 

}

if ($fh =~ m/(^|(\s)+)call(\s)+/i)

{

  $CallCount++;

}

}

close $fh or die "can't read close '$fp': $OS_ERROR";

 

print $CallCount."\n";

if ($CallCount == 0)

{

print $CallCount." Call couint is zero \n";

#GenExcel($ParentName,"Parent Do not have any Child");

}

if ($CallCount > 0)

{

 

open my $fq, "<", $fp or die "can't read open '$fp': $OS_ERROR";

while (<$fq>) # Reading file 

{

chomp($_);

if ($_ =~ m/(^|(\s)+)create(\s)+/i or $_ =~ m/(^|(\s)+)replace(\s)+/i)

{

GenExcel($ParentName,$_);

}

}

close $fq or die "can't read close '$fp': $OS_ERROR";

}

}

}

 

 

sub ReadFile

{

 

print "I have reached in new Read files \n ";

foreach my $fF (glob("$TempDir/*")) 

    { # looping file one by one

open my $Ph, "<", $fF or die "can't read open '$fF': $OS_ERROR";

while (<$Ph>) # Reading file 

{

chomp($_);

print $_."\n";

}

}

}

sub GenExcel

if ($_[0] eq 'Parent Name')

{

open(OUTFILE, ">>", $OutFile) or die "Cann't open $OutFile : $!.\n";

print OUTFILE "$_[0],$_[1]"."\n";

}else

{

    if($_[1] eq "Parent Do not have any Child")

{

open(OUTFILE, ">>", $OutFile) or die "Can't open $OutFile : $!.\n";

print OUTFILE "$_[0],$_[1]"."\n";

}else

{

my $Cname = substr($_[1],0,index($_[1],$char));

$Cname = substr($Cname,4);

open(OUTFILE, ">>", $OutFile) or die "Can't open $OutFile : $!.\n";

print OUTFILE "$_[0],$Cname"."\n";

}

}

 

}

 

 

print "Start\n";

ReadConfigFile();

 

$dir = $ConfigVar{"PROCPATH"} ;

#$TempDir = $ConfigVar{"TempFile"} ;

$dir =~ s/ //ig;

#$TempDir =~ s/ //ig;

 

 

 

#GenExcel($ParentName,$ChildName);

 

GetFilesCount();

 

GetFilesName();

#ReadFile();

 

print"---------------------------------\n";

print"\n";

print "End\n";

 

 

---------

 

use strict;

use Getopt::Long; 

use English;

use CWD;

use Tie::File;

use warnings;

my $ParName ='Parent Name';

my $char = '(';

my $TempDir = "C:\\DDL\\Temp";

my $HomeDir="C:\\DDL";

my $ConfigFile = $HomeDir . "\\" . "Conf.txt";

my $OutFile = $HomeDir . "\\" . "OutPut.csv";

 

sub GetFilesCount

my @files = <$TempDir/*>;

my $count = @files;

print "Total Number of files present in Folder ".$TempDir." = ".$count."\n\n";

}

 

 

##################################################################

# Name:ReadFile

# Description: Counting the number of files in the folder

# Inputs: $1=

# Return Code 0

####################################################################

sub ReadFile

{

my $CallCount = 0;

my $ParentName;

foreach my $fp (glob("$TempDir/*")) 

    { # looping file one by one

open my $fh, "<", $fp or die "can't read open '$fp': $OS_ERROR";

    while (<$fh>) # Reading file 

{

chomp($_);

if ($_ =~ m/(^|(\s)+)create(\s)+/i or $_ =~ m/(^|(\s)+)replace(\s)+/i)

{

$ParentName = $_;

}

if ($_ =~ m/(^|(\s)+)call(\s)+/i)

{

  $CallCount++;

}

 

}

close $fh or die "can't read close '$fp': $OS_ERROR";

if ($CallCount == 0)

{

GenExcel($ParentName,"Parent Do not have any Child");

}

if ($CallCount > 0)

{

#chomp($fp);

open my $fq, "<", $fp or die "can't read open '$fp': $OS_ERROR";

while (<$fq>) # Reading file 

{

chomp($_);

if($_ =~ m/(^|(\s)+)call(\s)+/i)

{

GenExcel($ParentName,$_);

}

}

close $fq or die "can't read close '$fp': $OS_ERROR";

}

}

}

 

sub GenExcel

 

if ($_[0] eq 'Parent Name')

{

open(OUTFILE, ">>", $OutFile) or die "Cann't open $OutFile : $!.\n";

print OUTFILE "$_[0],$_[1]"."\n";

}else

{

    if($_[1] eq "Parent Do not have any Child")

{

open(OUTFILE, ">>", $OutFile) or die "Can't open $OutFile : $!.\n";

print OUTFILE "$_[0],$_[1]"."\n";

}else

{

my  $Pname = substr($_[0],0,index($_[0],$char));

    $Pname =~ s/^\s+//;

 

my $Cname = substr($_[1],0,index($_[1],$char));

    $Cname  =~ s/^\s+//;

 

open(OUTFILE, ">>", $OutFile) or die "Can't open $OutFile : $!.\n";

print OUTFILE "$Pname,$Cname"."\n";

}

}

 

}

 

 

GenExcel($ParName,'Child Name');

GetFilesCount();

ReadFile();

 

Forums: 

TPT Error using DATACONNECTOR PRODUCER Operator - response (3) by feinholz

$
0
0

"Formatted" is a binary format that consists of a 2-byte record length ('n'), followed by 'n' bytes of data, followed by an end-of-record marker.
Your data format does not match that.
You might be thinking of "delimited" format (just based on the data you provided), where you can have comma-separated data.
However, unless you enable the QuotedData feature, the single quotes you show for column 2 will be considered part of the data.

Viewing all 4252 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>