-- ------------------------------------------------------------------------------
--
-- FICHIER      : mobile_voice.ctl
--
-- AUTEUR       : pascal
--
-- VERSION      : 1.0
--
-- CREE LE      : 01/08/04 10:18
--
-- MODIFIE LE   : %date_modified: 01/04/04 10:18 %
--
-- DESCRIPTION  :
--      Fichier de controle du chargement (SQL*Loader) de la table Oracle mobile_voice
--
-- SYNTAXE      :
--      sqlldr userid=user/password control=mobile_voice.ctl ...
--
-- HISTORIQUE   :
--
-- @(#) Bull SAS $Id: mobile_data.ctl,v 1.0 2008/04/01 00:00:00 pascal Exp $
-- 07/01/2010 : Ajout champ TrunkIn et TrunkOut
--
-- ------------------------------------------------------------------------------
LOAD DATA
infile '/archicom/data/toprocess/outputVOICE.unl'
APPEND
--INTO TABLE mobile_voice partition (mobile_voice_2017_04)
INTO TABLE mobile_voice
-- Definition du separateur de champs
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
-- Definition des colonnes
(
        Seq_num                 ,       -- YYYYMMDDnnnnnnnnn
        Type                    ,       -- "mobile_voice"
        Way                     ,       -- "oc" : Outgoing call, "ic" : Incoming call
        RecType                 ,       -- 0 : MOC
                                        -- 1 : MTC
                                        -- 2 : Roamer calls
                                        -- 5 : Transit type
                                        -- 100 : Forwarded calls
        service                 ,       -- "none"/"cug"
        Postpre                 ,       -- "pre" for prepaid
                                        -- "pos" for postpaid
                                        -- "roa" for roaming
        IMSI                    ,       --
        MSISDN                  ,       --
        CallingNum              ,       -- International number : CCCnnnnnnnn,
                                        -- where CCC is the country code (any prefixes like "00" or "+" must be withdrawn)
                                        -- and nnnnnnnn is the number without the national prefix.
                                        -- Examples:
                                        -- Mauritius international numbers: 230nnnnnnnn
                                        -- French international numbers: 33nnnnnnnnn
        disp_CallingNum         ,       -- Displayed number (for example without the country code)
        CalledNum               ,       -- International number : CCCnnnnnnnn,
                                        -- where CCC is the country code (any prefixes like "00" or "+" must be withdrawn)
                                        -- and nnnnnnnn is the number without the national prefix.
                                        -- Examples:
                                        -- Mauritius international numbers: 230nnnnnnnn
                                        -- French international numbers: 33nnnnnnnnn
        disp_CalledNum          ,       -- Displayed number (for example without the country code)
        TypeNum                 ,       -- "s" for short number, "l" for long number, "u" for unknown
        StartDate               "TO_DATE(:StartDate, 'YYYYMMDDHH24MISS')",       -- YYYYMMDDHHMMS
        duration                ,       -- Billed duration in seconds
        CdrType                 ,       -- Name of the originated equipment
                                        -- in the case "softswitch" or "huamscrod"
        Causeterm               ,       --
        HotBill                 ,       -- 0 : Normal invoicing
                                        -- 1 : Hotbilling no incidence on the offer but on start and execution of invoicing processes of the HOT
        RoamNum                 ,       -- Contains MSRN ( Mobile service roaming number) the MSRN can be not the same as calling number (informative) it's not the access
        CdrFilename             ,       -- name of the original file
        CmlSrvLvl               ,       -- Niveau de service Camel
        CmlSrvKey               ,       -- Cle du service Camel
        RecId                   ,       -- Record Entity Id
        CallRef                 ,       -- Call Reference
        Lac                     ,       -- Local Area Code
        CellId                  ,       -- Cell Id
        SuppServ                ,       -- Supplementary Services
        IMEI                    ,       -- IMEI de l'appareil utilisé
        CmlLegInfo              ,       -- Information Camel
        CMLInitCFInd            ,       -- Information Camel d'initialisation
        SysType                 ,       --
        callType                ,       -- Type of Call
        NE                      ,        --
	TrunkIn			,	--
	TrunkOut			--
)
