Variable using the Dymanin ODI file name creation

Hi all
I am creating a flat file dynamically using variables of ODI. I'm following a document in metalink (using dynamically specified A file name or directory name with ODI [423635.1 ID]). However, I get the following error whenever I try to run the interface:

java.lang.NullPointerException
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders (SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt (SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt (SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask (SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep (SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession (SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand (DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i (e.java)
at com.sunopsis.dwg.cmd.h.y (h.java)
at com.sunopsis.dwg.cmd.e.run (e.java)
at java.lang.Thread.run (unknown Source)

IKM: IKM SQL to the file append

I'm sure that it is impossible to locate the file. Can be the value of the variable is not passed, not sure. But, if I mention a name like abc.txt, it works. It creates a new file with abc.txt. However, when I try to use a variable, it throws null pointer exception.

Thank you
KK

Hello

Please declare the variable that you would use in the script that is executed, ODI needs its variables are declared explicitly.

I hope this helps.

Thank you.

Tags: Business Intelligence

Similar Questions

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • How can I get the 8.3 file name short AND way?

    We use some old DOS programs and need to use the old format back (filename.xxx). When the files are in the long trees, it is very difficult to find the names of files under Windows.

    There was a response published in Google (http://answers.google.com/answers/threadview/id/522710.html) which works very well under XP, but when I use it in Windows 7, I get the long file name.

    Does anyone know how to do this?  The program can be changed?  Here is the program of this flajason-ga posted, but it must be updated for Windows 7 (I only know how to program in Foxpro).  Thank you, Alan

    Topic: Re: how to get the 8.3 file name short AND path?
    From: flajason-ga on May 27, 2005 10:45 PDT
     

    After my last comment, I read your details a little closer.
    The last script I posted was to list out a whole directory in 8.3 format.
    If you are looking for a friendly way of Clipboard to recover the 8.3
    for individual files, that will be more to your liking.

    Same thing as before. Copy the below into Notepad and save it with a .vbs extension.
    Except that this time, you can simply drag and drop a folder or file icon
    on the .vbs file and it displays the short path in an input box.
    where you can copy the value and use anything you want to.

    If you're industrious, you can also save the .vbs file in your
    Folder "send to" (C:\Documents and Settings\ [yourname] \SendTo) to have
    It is available in your context menu with a right click.

    Set fso = CreateObject ("Scripting.FileSystemObject")

    ' Is a file or a folder?
    If fso. FolderExists (WScript.Arguments (0)) then
    "It's a folder
    Set objFolder = fso. GetFolder (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFolder.ShortPath)
    End If

    If fso. FileExists (WScript.Arguments (0)) then
    "It's a file
    Set objFile = fso. GetFile (WScript.Arguments (0))
    Refund = InputBox ("this is your short path:", "SHORT PATH", objFile.ShortPath)
    End If

    Hello

    Read the following article.

    How Windows generates 8.3 names to long file names
    http://support.Microsoft.com/kb/142982

  • There the opening Style "File names" &amp; "Names of Version" in LR?

    I (finally) move to Aperture and LR plans. My opening workflow was to import the original image file (a file camera RAW or TIFF file scanned) under its original name, make changes (which creates one or more 'versions'). I then rename the version based on a date-sequence numbering system, so that the original (unaltered) maintains its "original name.

    This method is possible in LR? Is there a file system and similar versions? It seems pretty basic info, but couldn't find anything in the forum search.

    Thanks, Dave

    If the version that you want to rename a file as a second saved from the original TIFF file, you can change its name by editing the file name field in the metadata Panel. If you want to rename by using a file name template, you can choose library > rename Photo (or press F2).

    If the version that you want to rename is a virtual copy, you must use the feature to copy name to name this virtual copy (a virtual copy being its own name any file). You will see the name field of the copy in the file name field when the metadata Panel is set to "Default" or "EXIF and IPTC.

    If you want to export a virtual copy as a new file version and have this new file using the name of the copy, include the name of the copy token in the filename template that you use for the exported file.

    Here is an example that I used recently:

    Original raw file. File name: 0001.RAW

    Virtual version of this raw file, cropped to 1:1 copy. Copy the name: Instagram

    Virtual copy exported JPEG file is automatically named: 0001 - Instagram.JPG

    (because I exported using a template configured with chips 'File Name' file name and then '-' then 'copy name')

  • Post in print, using the burst control file

    Hi all

    We use the break control file to print and send. Email option works very well. But when it comes to printing, printing "PDF file not printed. 128 MB of memory is necessary to allow a direct PDF printing"in printing.

    We use CUPS and this is the way that we use for printing.

    IPP://localhost:631/printers/YG_MAIN

    When we try to run the same program manually, giving the name of the printer and the number of copies at 1, then we are able to see the pdf output. Other reports are normal bi publisher also works well, w.r.t. this printer. We face this problem when we run xml program, with the option of printing bursting.

    Suggestions please...

    ---------------------------------------------------------------
    Here's the full breakdown control file,


    <? XML version = "1.0" encoding = "UTF-8"? >
    < xapi:requestset xmlns:xapi = "http://xmlns.oracle.com/oxp/xapi" >
    < xapi:globalData location = 'stream' >
    < / xapi:globalData >
    < select xapi:request = ' / XX_IMB/LIST_G_PAT/G_PAT ">
    < xapi:delivery >
    < xapi:email id = "123" server = "XXXXXX.com" port = "25" from = "[email protected]" > "
    < xapi:message id = "123" to attachment = "${DESTINATION}" = "true" content-type = "text/html" subject = "Test email" > please find the attachment < / xapi:message >
    < / xapi:email >
    < xapi:print id = "print1" printer = copies "ipp://localhost:631 / printers / ${DESTINATION}" = "1" / >
    < / xapi:delivery >
    < xapi:document - output type = 'pdf' flow '123' = >
    < xapi:template type = "xsl - fo" location = 'xdo://XXCUS. XX_MAIN.en.us"filter=".//G_PAT[DESTINATION_TYPE='Email"]" > "
    < / xapi:template >
    < / xapi:document >
    < xapi:document - output type = 'pdf' flow 'print1' = >
    < xapi:template type = "xsl - fo" location = 'xdo://XXCUS. XX_MAIN.en.us"filter=".//G_PAT[DESTINATION_TYPE='Print"]" > "
    < / xapi:template >
    < / xapi:document >
    < / xapi:request >
    < / xapi:requestset >

    BI Publisher burst of CUPS printer uses no PASTA, out don't is converted from PDF to Postscript, it does when it is executed via simultaneous Manager.
    You can put an entry in the next $XDO_TOP/resource/xdodelivery.cfg (replace with your printer):



    ipp://mycupsserver.mydomain:631/printers/MYPRINTER
    /usr/local/bin/pdf2ps -paper A4 {infile} {outfile}

    Kind regards
    Gareth

  • I can not package for the project when I used the blackberry resource files

    I can't package the project when I used the blackberry resource files.

    Packaging HelloWorl project
    C:\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\bin\rapc.exe-quiet codename=deliverables\Standard\5.0.0\HelloWorl deliverables\Standard\5.0.0\HelloWorl.rapc-sourceroot=C:\workspace\HelloWorl\.locale_interfaces; C:\workspace\HelloWorl\src; C:\workspace\HelloWorl\res-import=C:\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\lib\net_rim_api.jar C:\workspace\HelloWorl\bin
    Cannot open the C:\workspace\HelloWorl\bin/com.helloresL.crb/ dir
    Error! : error: auditor failed: C:\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\bin\preverify.exe d C:\DOCUME...
    Packaging project HelloWorl failed (taken in 0,219 seconds)

    I have fixed my problems, I was using a unicode language in windows, so I changed the language for non-unicode format.

  • Using the external js file in the custom workflow

    Hello

    I use 11.1.1.8 and jdev 11.1.1.7 spaces

    While referring to (http://js.xyz.com/js/abc.js) external js file in my integrated jsff in weblogic page, there is no problem, js works perfect , but when I deploy my workflow a workflow customized to webcenter spaces page cannot access this file js url.

    I have to give this operation any grant? How?  I found something external applications like this, but there wasn't a connection information. My field of js file didn't need approval.

    Thank you.

    Jsff file, I use the js as file

    < af:resource type = "javascript".

    source ="http://js.xyz.com/js/abc.js" / > ".

    Thanks for everyone, location external links js in the page of the portal model has solved my problem.

  • Retrieve by using the backup control file

    Hello

    I was reading a book called Pro Oracle Database Administration by Darl Kuhn. There, under the theme of "The valuation of the loss of all control files", noted that all data files and control files are restored from a backup, because if we do not restore the data files the RCS in control files would be lower than the data in these scenarios files. Since online redo logs and archived newspapers is applied to the data files to roll forward in a current consistent state and does not roll forward to a control file.

    It is then mentioned to use 'recover the database by using the backup control file' then apply the logs (archive and redo if necessary).

    However I personally tested this script in a test environment and to bring all the backup control file could issue the same command as above and recover the database.

    My question is I know again and archives are applied only to the data files. So how does the control file are synchronized back when we do not restore the backup data files.

    Thank you

    If we do not restore the data files, the RCS in control files would be lower than the data files. Since online redo logs and archived newspapers is applied to the data files to roll forward in a current consistent state and does not roll forward to a control file.

    It would be incorrect you have determined. You can only restore the control files. You can manually create a control file and always do the restore.

    My question is I know again and archives are applied only to the data files. So how does the control file are synchronized back when we do not restore the backup data files.

    The control file is updated as well.

    See you soon,.
    Brian

  • I can't find a newer version of adobe flash player for ubuntu 14.04, I tried to use the apt version but it wouldn't work and I don't know how to use the tar.gz files and install, I think the current version to .deb

    I can't find a newer version of adobe flash player for ubuntu 14.04, I tried to use the apt version but it wouldn't work and I don't know how to use the tar.gz files and install, I think the current version to .deb

    Hi LF12,.

    The latest version of Flash Player for Linux is 11.2.202.400.  The current versions of Flash Player are displayed here http://www.adobe.com/software/flash/about/. The versions on the page are updated with each new version.

    --

    Maria

  • How to swap two values without using the third variable using the procedure

    How to exchange the two values without using the third variable using the procedure?

    In a procedure using two mode we pass two values A = x and B = y, and let us pass parameters to receive the output has A = y and B = x without using the third variable

    Published by: Millar on August 19, 2012 11:23

    Your question doesn't seem wise. As written, there is no reason to a third variable, just

    CREATE OR REPLACE PROCEDURE(
      x IN number,
      y IN number,
      a OUT number,
      b OUT number
    )
    AS
    BEGIN
      a := y;
      b := x;
    END;
    

    If it's an interview question, I suspect that the intention was that you had two settings IN OUT and you wanted to swap the values without the help of a third variable.

    Justin

  • Loading data into the table by file name

    Hi all

    I am new to ODI. I have a requirement of loading a flat file in oracle, as well as the name of the file in a single column of the table. This means that, if there are 10 rows of data from this file, then the extra column "FileName" to the table will be the name of the active file written 10 times. Please suggest how this can be achieved. I am able to do half of it but the file name is not filled.

    Thank you.

    Hello

    See the link below for dynamic fair value can be useful for you

    http://blogs.Oracle.com/dataintegration/2009/04/using_parameters_in_odi_the_dy_1.html

    Thank you
    Merlina.

  • installation of windows 8, Setup requires me to "Change the folder or file name of C:\users on drive C", but it won't let me

    ORIGINAL TITLE: hellllllpppp?

    Hi!, iam windows installation 8 and Setup requires me to do and I qoute, "Change the name of the file or folder of C:\users on drive C" well it won't let me change or even move and iam the admin here too, why it asking me that and how do I change because I can not go forwartd autour or under this so I can complete the set up iam using xp pro with 9 browser

    Hello

    Create a bootable USB drive or DVD from the .iso in Windows 8:

    http://www.eightforums.com/tutorials/2227-create-bootable-USB-DVD-Windows-8-release-preview-ISO.html

    Then start under it and install.

    If you do not format anything during installation, all your old files will be placed in folder C:\Windows.old.

    You can then copy what you want to keep, get out of here.

    After that, you can use the disk cleanup utility to remove this folder if you check the box to do this.

    Enjoy.

  • How can I change the font color on the title of file name list in a folder?

    When you do a "file save as"..., type a document name... Can have the police on this document at a red name round (or other color) fonts for the list of files in the folder.  I want to be able to open the folder and have a file name "stand out" in other securities of black font in grip my eyes with red font?

    Vista does not have this capability.  There may be some 3rd party programs that might work for you, but I could find no one who were free and no coming to add this feature to Windows Explorer.

    Here "a s business option: http://www.xyplorer.com/index.htm but it's a pretty radical change (it is just to add the ability to change the fonts, colors file, and includes many other options, but it is not Windows
    Explorer - this is a totally different file manager) and it costs money so I do not recommend because I think that it is better to use a totally different program Windows Explorer, even if it means not to change the font color of file names.  And if you check, it's a bit expensive just to get this functionality (and who knows the other features of Windows Explorer that you like that you may lose with this alternative - don't really know us much and that it works well with Vidta or causes problems - maybe even serious problems as far as we know - because I know anyone who has ever tried it).

    Sorry if this isn't what you wanted to hear, but it's like that. I think the right answer is that Vista is not supported this feature, and then remove it.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • CFHeader to set the content-disposition file name does not

    Hello


    We have the code that creates a workbook with the POI library and then using CFHeader to set name of file with content-disposition, as shown in the code below. After making the content available, we write the Excel workbook in the browser. The code is below.


    This works perfectly in CF 9 but when we went to SEE 11 we found it doesn't work anymore. The same code works fine in CF 9 but not in CF 11. The file name is ignored and the file is now given the name of the cfm script is called with the correct xls extension.


    Any suggestions as to what is the cause for CF not CF 9 11 would be appreciated.


    Code:

    < name cfheader = "Content-Disposition" value = "seizure; filename = "#arguments. "FileName #" ">"

    < cfscript >

    Write the workbook in the ByteArrayOutputStream to get the ContentLength

    local.workBook.write (local.outStream);

    local. Len = arrayLen (local.outStream.toByteArray ());

    local.outStream.flush ();

    local.outStream.close ();

    Working now on the display of the browser output stream

    local. Context = getPageContext();

    local.context.setFlushOutput (false);

    Calling the getResponse twice (2nd getResponse) method gets the binary response of the character response (1st getResponse)

    local. Response = local.context.getResponse (m:System.NET.FtpWebRequest.GetResponse ());

    retrieve the output stream from the response to the browser.

    local.out = local.response.getOutputStream ();

    local. Response.Reset ();

    Set the content type and the contentLength

    If the two are not provided, then the data will be displayed not correctly

    local.response.setContentType("application/vnd.ms-excel");

    local.response.setContentLength (local.len);

    write the workbook in the binary output of http response stream

    local.workBook.write (local.out);

    clean things up and close the output stream

    local.out.Flush ();

    local.response.flushBuffer ();

    local.out.Close ();

    < / cfscript >

    Kind regards

    Leslie

    I found the problem. He is not related to the use of the POI library to all. Also we are migrating to CF 11 currently and just try to get things migrated as is. After our migration, we will look at CFSpreadsheet to see if it can meet the demand of our users formatting now.

    It seems that the call to local.response.reset () in CF 11 now clears the response properties, including the elements of headers. CF 9, he should not have deleted them as background. By setting the Content-Disposition response header after this point, the value was available for the browser to use.

    If the default file for a generated file name must be the name of the script creating the name of the file followed by the file appropriate for the file extension.

    The updated code is below, note the lines of code in bold.

    Write the workbook in the ByteArrayOutputStream to get the ContentLength

    local.workBook.write (local.outStream);

    local. Len = arrayLen (local.outStream.toByteArray ());

    local.outStream.flush ();

    local.outStream.close ();

    Working now on the display of the browser output stream

    local. Context = getPageContext();

    local.context.setFlushOutput (false);

    Calling the getResponse twice (2nd getResponse) method gets the binary response of the character response (1st getResponse)

    local. Response = local.context.getResponse (m:System.NET.FtpWebRequest.GetResponse ());

    retrieve the output stream from the response to the browser.

    local.out = local.response.getOutputStream ();

      local. Response.Reset ();

    Send the browser the good content-disposition header

    local.resp = local.context.getResponse ();

    local.resp.setHeader (("string", "Content-Disposition") javacast, javacast ("string", "001438.EPS nt;filename=#arguments.fileName#")); "))

    Set the content type and the contentLength

    If the two are not provided, then the data will be displayed not correctly

    local.response.setContentType("application/vnd.ms-excel");

    local.response.setContentLength (local.len);

    write the workbook in the binary output of http response stream

    local.workBook.write (local.out);

    clean things up and close the output stream

    local.out.Flush ();

    local.response.flushBuffer ();

    local.out.Close ();

  • Using the store provider files to store in the database files?

    Hello

    I followed the same steps provided on this site (http://hishamgalal.blogspot.com/2009/01/using-file-store-provider-to-store.html) for the creation of a file store provider to store all database files, also created a partition. Always found content is stored in the file system. I use UCM 11.1.1.6.0

    Thank you

    In 11.1.1.6, I noticed another oddity with FSP who may be your problem.

    Rather than change the rule to store file by default for storage in the database, change the rule named "DispByContentId" and set it to use the database storage.

    11.1.1.6 uses this 'default' rule instead of the so-called 'real' default value rule. (Yes, it should be filed as a bug).

Maybe you are looking for