get the name of a directory file and insert it into a table

Hello

I have a requirement, I need to read the name of a Linux directory file and enter the file name in a variable,

After that, I need to insert this file name in a table.

EX: is it a file1.txt in Yearbook of the CBA, and I read that 'file name' in the v_file_name variable and I'm going to insert this file name in a table.

Hello

I think you've got your request of replied by Chantal.
Shoul you have a kind of intelience in the name of the file itself so that ODI retrieves the correct file and insert into the table.

Thank you
Fati

Tags: Business Intelligence

Similar Questions

  • PHP - get the name of 'field of file' and go to the database?

    Is it possible to extract the name of 'image' of the field 'file' and inserting it into a database using php?

    < input type = "file" name = "ImageName" id = "ImageName" >

    I can't have:

    $ImageName = trim($_FILE['ImageName']);

    So why this managed operation?

    See you soon

    Operating system

    One of the elements of the array $_FILES autoglobal is the name of the file.

    http://us2.php.net/manual/en/reserved.variables.files.php

    You would get it from - $_FILES ["file"] ["name"]. You can see all of these as follows-

    ECHO '.

    "; Exit(print_r($_files)) ;

    comme une instruction de débogage juste après déterminer si le formulaire a été soumis...

  • How can I extract the data from a csv file and insert it into an Oracle table? (UTL_FILE)

    Hi, please help me whit this query

    Im trying to extrate the data in a file csv and im using the ULT_FILE package
    I have this query that read the file and the first field, but if the field has a different length does not work as it should

    For example if I had this .csv file:

    1, book, laptop

    2, pen, Eraser

    3, notebook, paper

    And in the table, I had to insert like this

    ID descrption1 description2

    laptop 1 book

    Eraser pen 2

    paper laptop 3

    For now, I have this query, which displays only with DBMS:

    Declare

    -Variables

    Cadena VARCHAR2 (32767).

    Vfile UTL_FILE. TYPE_DE_FICHIER;

    Dato varchar2 (200);                                             -Date

    dato1 varchar2 (200);

    dato2 varchar2 (200);

    Identifier varchar2 (5): = ', ';                             -Identifier (en)

    v_ManejadorFichero UTL_FILE. TYPE_DE_FICHIER;     -For exceptions

    -Table variables

    I_STATUS GL_INTERFACE. % OF STATUS TYPE.

    I_LEDGER_ID GL_INTERFACE. TYPE % LEDGER_ID;

    I_USER_JE_SOURCE_NAME GL_INTERFACE. TYPE % USER_JE_SOURCE_NAME;

    I_ACCOUNTING_DATE GL_INTERFACE. TYPE % ACCOUNTING_DATE;

    I_PERIOD_NAME GL_INTERFACE. TYPE % PERIOD_NAME;

    I_CURRENCY_CODE GL_INTERFACE. CURRENCY_CODE % TYPE;

    I_DATE_CREATED GL_INTERFACE. DATE_CREATED % TYPE;

    I_CREATED_BY GL_INTERFACE. CREATED_BY % TYPE;

    I_ACTUAL_FLAG GL_INTERFACE. TYPE % ACTUAL_FLAG;

    I_CODE_COMBINATION_ID GL_INTERFACE. TYPE % CODE_COMBINATION_ID;

    I_ENTERED_DR GL_INTERFACE. TYPE % ENTERED_DR;

    I_ENTERED_CR GL_INTERFACE. TYPE % ENTERED_CR;

    I_ACCOUNTED_DR GL_INTERFACE. TYPE % ACCOUNTED_DR;

    I_ACCOUNTED_CR GL_INTERFACE. TYPE % ACCOUNTED_CR;

    I_TRANSACTION_DATE GL_INTERFACE. TRANSACTION_DATE % TYPE;

    I_REFERENCE1 GL_INTERFACE. REFERENCE1% TYPE;

    I_REFERENCE2 GL_INTERFACE. REFERENCE2% TYPE;

    I_REFERENCE3 GL_INTERFACE. REFERENCE3% TYPE;

    I_REFERENCE4 GL_INTERFACE. REFERENCE4% TYPE;

    I_REFERENCE5 GL_INTERFACE. REFERENCE5% TYPE;

    I_REFERENCE10 GL_INTERFACE. REFERENCE10% TYPE;

    I_GROUP_ID GL_INTERFACE. GROUP_ID % TYPE;

    BEGIN

    Vfile: = UTL_FILE. FOPEN ('CAPEX_ENVIO', 'comas.csv', 'R');

    loop

    UTL_FILE. GET_LINE(Vfile,Cadena,32767);

    dato1: = substr (cadena, instr(cadena, identificador,1,1)-1, instr(cadena, identificador,1,1)-1);

    dato2: = substr (cadena, instr (cadena, identifier, 1, 1) + 1, instr(cadena, identificador,3,1)-3);

    dbms_output.put_line (dato1);

    dbms_output.put_line (dato2);

    -The evidence

    -dbms_output.put_line (cadena);

    -dbms_output.put_line (substr (dato, 3, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (dato, instr (dato, identifier, 1, 2) + 1, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (cadena, 1, length (cadena)-1));

    end loop;

    UTL_FILE. FCLOSE (Vfile);

    -----------------------------------------------------------------------------------EXCEPTIONS------------------------------------------------------------------------------------------------------------------------------------------------------------

    EXCEPTION

    When no_data_found then

    dbms_output.put_line ('Todo Correcto');

    When utl_file.invalid_path then

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20060,'RUTA DEL ARCHIVO NULLIFIED: (');)

    WHEN UTL_FILE. INVALID_OPERATION THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20061,'EL ARCHIVO NO PUDO SER ABIERTO ");

    WHEN UTL_FILE. INVALID_FILEHANDLE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20062, 'INVALIDO MANAGER');

    WHEN UTL_FILE. WRITE_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20063, 'ESCRITURA ERROR');

    WHEN UTL_FILE. INVALID_MODE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20064, 'MODO INVALIDO');

    WHEN UTL_FILE. INTERNAL_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20065, 'ERROR INTERNO');

    WHEN UTL_FILE. READ_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20066, 'LECTURA ERORR');

    WHEN UTL_FILE. FILE_OPEN THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20067,'EL ARCHIVO ARE ESTA ABIERTO ");

    WHEN UTL_FILE. THEN ACCESS_DENIED

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20068, 'REFUSED ACCESS');

    WHEN UTL_FILE. DELETE_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20069, 'OPERACIÓN BORRADO FALLO');

    WHEN UTL_FILE. RENAME_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20070, 'OPERATION SOBREESCRITURA FALLO');

    END;

    Hello

    Try something like this:

    POS1: = INSTR (cadena, idntificador, 1, 1);
    POS2: = INSTR (cadena, idntificador, 1, 2);

    ID: = SUBSTR (cadena, 1, pos1 - 1);
    description1: = SUBSTR (cadena, pos1 + 1, (pos2 - pos1)-1);
    Description2: = SUBSTR (cadena, pos2 + 1);

    where pos1 and pos2 are numbers.

    Rather than use UTL_FILE, consider creating an external table.  You won't have to write any PL/SQL, and this means that you won't be tempted to write a bad article of EXCEPTION.

  • Read the BLOB and insert data into a table

    Hi all

    Let us examine below on Oracle DB 12 c:

    create table xx_test3 (c blob);
    
    insert into xx_test3 (c) values (utl_raw.cast_to_raw(
    'azertyuiop,qsdfghjklm,wxcvbn'));
    
    
    create table xx_target (col1 varchar2(50));
    
    
    
    

    Can someone guide me how to read the data and insert it into the xx_target table?

    Necessary result is:

    
    select * from xx_target;
    
    
    COL1                                              
    
    --------------------------------------------------
    azertyuiop                                        
    qsdfghjklm                                        
    wxcvbn                                            
    
    3 rows selected.
    
    
    
    
    

    Thanks in advance,

    Stoyanov.

    insert into xx_target (col1)

    with the data as)

    Select utl_raw.cast_to_varchar2 (dbms_lob.substr (c, 32000, 1)) CBC

    of xx_test3

    )

    Select regexp_substr (CBC, ' [^,] +', 1, level)

    from the data

    connect by level<= regexp_count(src,="" ',')="" +="">

  • Can I copy the list of names of files and paste them into a table

    I have a list of files in a folder and here paste the titles only in a table

    You can create a list of text files by using the command prompt.

    • Open a command prompt in the folder that you want to get the list of. (You can open a command prompt and navigate to your required file, or use the Solution Explorer and press and right click on your file at the same time. Then you should see "open a command here window' in the menu - click on it.)
    • Enter the command "dir /b > filenames.txt" (without the quotes), then simply type dir /b > filenames.txtand press return/enter to transport.
    • Use Explorer to navigate to your file and you should now see a text file called filenames.txt. Open and it must contain a list of files. Then, copy and paste the list where you want to.

    If all goes well, I understood your question correctly, if so, hope it helps.




  • Command to get the name of VC, DC, Clu and ESXi to a VM

    Commanders:

    Am currently manages 8 VCs (vSphere 5) through vSphere clinet. So seeking a particular VM in all the VCs became horrible in this situation. Using PowerCLI to make this job easier. So I installed 5 PowerCLI and connected my VCs.

    I need a command line to search for a virtual machine, which returns the name of VC, Datacenter Name, name of Cluster and ESXi Hostname. I know it's a single line and very easy work for you guys to answer.

    Thanks in advance!

    Try something like that, is not the quickest, but it should give you all the values

    Get-VM MyVM |Select Name,@{N="ESX";E={$_.VMHost.Name}},  @{N="Cluster";E={Get-Cluster -VM $_ | Select -ExpandProperty Name}},  @{N="Datacenter";E={Get-Datacenter -VM $_ | Select -ExpandProperty Name}},  @{N="vCenter";E={$_.ExtensionData.Client.ServiceUrl.Split('/')[2]}}
    
  • updated line and insert them into another table with trigger.

    Hi guys I have a table that looks like this.
    CREATE TABLE TEST
      (
        "COL1" VARCHAR2(20 BYTE),
        "COL2" VARCHAR2(20 BYTE),
        "COL3" VARCHAR2(20 BYTE)
      )
    I'm going to insert the col1 and col2 values, but I need to get the value of column 3 of table 2 and then insert the complete record in table 3. I love doing that with a trigger. I get an error message and I can't for the life of me figuere out what im doing wrong.
    So here is my nonfunctional trigger.


    Here are the two table

    CREATE TABLE TESTTABLE
      (
        "COLUMN1" NUMBER(15,0),
        "COLUMN2" NUMBER(15,0)
      )
     
    
    Insert into TESTTABLE (COLUMN1,COLUMN2) values (1,5);
    HERE IS THE CODE OF THE TRIGGER
    CREATE OR REPLACE TRIGGER TRIGGER1 
    AFTER INSERT ON TEST 
    FOR EACH ROW 
    BEGIN
      update TEST
      SET COL3 = (SELECT COLUMN2 FROM TEST, TESTTABLE WHERE COLUMN1 = :new.COL1);
    END
    I get an error of trigger mutation that I tried the other iterations of the above but I'm not getting anywhere. I have dumb down my problem at these 3 table.
    Can someone point me in the right direction.

    You'll have to do some reading, but it comes down to process the data on education instead of line level.
    You may even be not at all a trigger.
    See:
    http://www.Oracle-base.com/articles/9i/mutating-table-exceptions.php
    http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551198119097816936

  • Get the name of the movie file, not source.dir name?

    How can I know the real of a movie file name as it appears in the directory / folder on drive at RUN time.

    I have a projector that I use in many places on several CD-ROMs, and I rename this projector to match the particular CD

    For example:
    I have a project for the Oman, and I rename the projector on: Oman_Demo.exe

    Yet, when the projector asks "movieName", he always gets the name of the Source file. 'myStartup.dir '.

    How can I get the name of the Runtime of the projector file?

    (I'm also using the BuddyAPI Xtra in the projector, if that helps)

    Try
    the applicationname

  • Get the names of palette file types

    Hello

    How can I get the names of all types of step programmatically in a palette file?

    In my view, it should be possible, but I tried different approaches using the poster of API reference and couldn't find a way.

    Thank you and best regards,

    Aditya

    TestStand 4.2.1

    LabVIEW 2009 SP1

    propertyObjFile.TypeUsageList.NumTypes

    propertyObjFile.TypeUsageList.GetTypeDefinition)

    typeaspropobj. TypeCategory is TypeCategory_StepTypes

    Hope this helps,

    -Doug

  • How do I get the name of a duplicated or created control and add a reminder

    Hi all

    According to the number of entry points I need, I duplicate a digital or an input string to the DuplicateCtrl function. My question is, how do I get the name and id of the control that has been created, and how can I assign a callback to it? Alternatively, it would be better to create a fresh ctrl instead of duplicate?

    Thanks in advance!

    Hi TurboMetrologist,

    Why are you trying to get the name of constant control? Remember that you cannot use this name to address control; control names are in fact simply the macros in the file associated with the UIR, include in other words, the preprocessed compiler code and everywhere where the names of PANEL_CONTROL replaces the digital value as parameters to functions (and therefore 'control' parameter is an int value and not a char *)

    That's why NewCtrl () or DuplicateCtrl () functions return a control ID: this is the handle to the new object, the only way to handle it. You will need to store this handle in a nonvolatile memory so that you can access durng life program.

    In addition, there are other ways to assign a meaning to a control to pass on the name of constant control. For example, you can use the callbackData parameter to differentiate the different copies of a control.

    Let me explain with an example. You said that you need several entries (dynamically created that you don't know in advance how many of them use); a solution could be:

    • Design a master copy of a control in the IUR Editor, where it is easy to customize; also assign a callback function, if it must be common to all copies of the control
    • Assign a value to this control callbackData, programmatically for example SetCtrlAttribute (...,..., ATTR_CALLBACK_DATA, (void *) 1);
    • Duplicate the control, and then assign a different callbackData
      for (i = 2; I have< 5;="" i++)="">
      handle = DuplicateCtrl (...);
      SetCtrlAttribute (..., handle, ATTR_CALLBACK_DATA, (void *) I);
      }

    By operating this way, whenever the reminder of control is triggered by any control, it will receive the callbackData assigned, and you will be able to differentiate your code with a simple switch:

    switch (callbackData (int)) {}

    case 1: / / the master controls

    break;

    case 2: / / first dual control

    break;

    }

  • Can ODI - I get the name of the file in a variable?

    Hello, I am trying to get the name of the folder (or subfolder) dynamically over the package that is currently running. I tried various API (from the Toolbox) calls including < % = odiRef.getSession("SESS_NAME") % >, but this isn't quite what I need.  I'm real new to ODI...

    I'm under ODI 11.1.1.6

    Thanks in advance.

    CL

    Yes, I think that this decision if more flexible. I use this way.

    . or you could hold information about the records in the table or XML file or a properties file and store it in the variable... It depends on your tasks and objectives

  • Get the name of file that uses the file adapter

    Hello world.

    I know I can get the file name during playback of a file by clicking on properties and jca.filename and by setting a file name by going in the invoke properties when using 'Type' as an input. My question is, can we get the name of the file that the file adapter is used when you specify the file naming convention in the Setup Wizard. For example, you can have the file adapter use filenames like "MyFile%yyMMddHHmmssSSz%.txt". I want to get this information from the file adapter. I thought if the property jca.filename uses 'Type' as 'Input' assign names to files then surely 'Type' as 'exit' get the file name or a file adapter that writes a file, but of course it is not. Does anyone know if this can even be done?

    Thanks in advance.

    Hello

    You can perform a synchronization of read operation (without reading the content of the file) after writing the file in the same BPEL process, to get the name of the file that was written by the write operation.

    Thank you

  • Get the name of the file by the File/FTP adapter

    Hello

    I have a requirement in which I can manage the State of the files being processed by the file adapter. As the file adapter provides the ability to process files is the wild card, is there any way by which I can get the full name of the file.
    I have seen a few articles indicating that the ftp adapter can do but I could not file name, even using ftp adapter.


    Thanks in advance...

    Hello

    If you use the 11g, then you can make use of the property activities tab receive and use jca.ftp.fileName to get the name of the name of the file.

  • Can we get the name of the fmx file when running

    Hi all
    can we get the name of the fmx file that performs a DML operation on a specific table, we can back track which fmx module did DML on a specific table. The reason why I need it because I have 7 fmx different files that make a DML operation on a specific table and these fmx files are used by different users. Not necessarily 1:1 for example. a user can do DML through 3 fmx different files. So in this case if I want to want to know what FMX file that DML has take place. How can I achieve that. I know I can get the oracle via session username $ v, but it is not enough for my needs. I need also the name of the fmx file.

    I use:

    Forms [32 bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    Any help?

    Best regards
    Percy

    Percy,

    For this, you can set the Module field in the V$ session in each form

    DBMS_APPLICATION_INFO.SET_MODULE(MODULE_NAME => :SYSTEM.CURRENT_FORM, ACTION_NAME => USER);
    

    Write this in every form, and you will get the name of the form in the module field in the V$ SESSION form name.

    I hope this helps.

    Kind regards

    Manu.

  • Get the name/path of current .cfm file...

    I'll make a script of "tracking" for a Web site.  My idea is to add a < CFINCLUDE > to each server the .cfm file (at the very end, it would be easier to remove when im done), and have the included script add a record to a database containing the path/file name of the .cfm file.  for example, index.cfm will include trackscript.cfm, and after the treatment the index.cfm a database will be a record in this container path/name of the file to index.cfm.

    I'm new to coldfusion, but I think that I got it, except on the way to get the name of the file that will be added to the database.  is there some kind of function or variable available that will give me the name of the file running .cfm?

    GetCurrentTemplatePath() will give you the absolute path of the current CFM file.
    

Maybe you are looking for

  • Need for documentation on Modem commands

    Hello! I have a program to connect to a modem of special data. The program requires an initialization as string: ATZ ^ MATS0 = 1 S = 64 15 ^ M.Toshiba modem does not work with to the commands that I use for several other modems (wavecom, elster, devo

  • no dvd playback

    have a hp Pavilion under W - XP.  Won't play DVD or show files. (on DVD).  Data on a CD will run, files, software, etc.  Nothing downloaded VLC player, Windows Media player.  I have 3 different decoders listed, say no, they Win. Med. Ctr. compatible,

  • 8625 all-in-One: 10 Windows updates for null printer and fax for settles not 8620

    We have four machines Windows 10 using our 8625 all-in-in-one on the network.  Only used the installation CD.  The machine stops of if a 8620 update for printer Null and Null fax microsoft who do not always with 0x802200b and 0 x 80070790 respectivel

  • What is mingp.exe and mincp.exe.

    These two exe files keep close but I don't know what they are. They are part of my operating system or a virus? How can I get rid of them if they are a virus, adawere or something else?

  • ' DNS probe Finsished no Internet ' on the data after 5.1.1 update

    I liked having my Sony Xperia Z3 Compact until recently after the 5.1.1 update... Since I've updated my phone, he had problems connecting to the internet using data.  Wifi works fine, but when executing the data after a few minutes I get the error 'D