Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 17 Oct 2014 @ 13:02:53 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   FastExport error while using BTEQ .IMPORT command
 
From:   Lenka, Dipti Prakash

Dear Team,

I am using Teradata .IMPORT bteq command in fast export utility to load certain values in a table before creating extract file. But it is throwing error :

     -----------------------------------------------------------
     UTY0014 Bad keyword in the IMPORT command at position 8:
          Expected "INFILE" but found "vartext".
     -----------------------------------------------------------

Please advise.

My code is as follows.

1. My FastExport script

     .LOGON edw/logon,pasword;

     .import vartext  file = TEST.SEQ
     .repeat *

     USING(
           Col1 VARCHAR(50),
           Col2 VARCHAR(50),
           Col3 VARCHAR(50)
          )

     INSERT INTO  ttmp.test_dipti1 (Col1,Col2,Col3,CREATE_TS) VALUES (:Col1,:Col2,:Col3,CURRENT_TIMESTAMP);

     .BEGIN EXPORT
     SESSIONS 16;

     .EXPORT OUTFILE  gth_gl_acct_bal_actl_report.dat MODE RECORD FORMAT TEXT;

     SELECT
             COALESCE( TRIM(accounting_period_year),'')      || ',' ||
             COALESCE( TRIM(accounting_period_nbr),'')       || ',' ||
             'ActualUSD'                                     || ',' ||
             COALESCE( TRIM(hfm_currency),'')                || ',' ||
             COALESCE( TRIM(hfm_view),'')                    || ',' ||
             COALESCE( TRIM(reporting_sobp_code),'')         || ',' ||
             COALESCE( TRIM(hyperion_reporting_code),'')     || ',' ||
             COALESCE( TRIM(reporting_inter_entity_code),'') || ',' ||
             COALESCE( TRIM(data_type_code),'')              || ',' ||
             COALESCE( TRIM(rptd_functional_group_id),'')         || ',' ||
             COALESCE( TRIM(rptd_fm_product_line_code),'')        || ',' ||
             COALESCE( TRIM(mgmt_stat_code),'')              || ',' ||
             COALESCE( TRIM(actual_end_balance_total),'')    || ',' ||
             COALESCE( TRIM(fml_account_code),'')            || '|' ||
             COALESCE( TRIM(common_sub_account_code),'')     || '|' ||
             COALESCE( TRIM(fml_product_service_code),'')    || '|' ||
             COALESCE( TRIM(fm_report_group_code),'')        || '|' ||
             COALESCE( TRIM(report_type_code),'')            || '|' ||
             COALESCE( TRIM(set_of_books_partition_code),'') || '|' ||
             COALESCE( TRIM(fml_organization_code),'')       || '|' ||
             COALESCE( TRIM(org_function_code),'')           || '|' ||
             COALESCE( TRIM(org_sub_function_code),'')       || '|' ||
             COALESCE( TRIM(solution_portfolio_id),'')
          FROM tedw.gth_gl_acct_bal_actl_report
          WHERE hfm_currency = ''
          AND instance_id = '8001'
          AND set_of_books_id = '106'
          AND hyperion_reporting_code = '9818'
          ;

     .END EXPORT;

     .LOGOFF;

     .QUIT;

2. The TEST.SEQ file will have only one row that is : 7293 '1' '001'

3. The table structure as follows :

     CREATE MULTISET  TABLE ttmp.test_dipti1 (
     Col1 VARCHAR(50),
     Col2 VARCHAR(50),
     Col3 VARCHAR(50),
     CREATE_TS TIMESTAMP(6)
     )
     PRIMARY INDEX(Col1);

So I want to store the 7293, '1' ,'001' in Col1, Col2 and Col3 respectively with CURRENT_TIMESTAMP in Create_TS column before creating the extract file.

Please advise.

Thanks in advance.


Regards,

Dipti



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023