Rule of transformation in ODI

Hi gurus,

I'm using ODI 11 g.

How will you do the map below in odi

Take the value before lengh and insert 0 and decimal is 12 for 0 before and after decimal length is 6.

Source Target         
99,20 + 000000000099200000
100,20 + 000000000100200000
-2520.365 - 000000002520360000

The source value is: DECIMAL (11.2)
Target value is: + 9 (12) V9 (6)

Example:
Value source: 456.78
Target value: + 000000000456780000

Thank you

Hi Marc,

I agree with the code you posted but dynamically, it won't hold.

Hello

I corrected the code and tested, please find below the code change and it will support dynamically based on values - (negative) + (positive) according to the prefix next to the source

Select decode (substr('-2520.365',1,1), '-','-', '+').
LPAD (substr (Replace('-2520.365','-',''), 1, InStr (Replace('-2520.365','-',''),'. ', 1)-1), 12, 0)
|| RPAD (substr (Replace('-2520.365','-',''), InStr (Replace('-2520.365','-',''),'. ', 1) + 1), 6, 0) twice;

-->-000000002520365000 (exit)

Select decode (substr ('2520.365', 1, 1), '-','-', '+').
LPAD (substr (Replace('2520.365','-',''), 1, InStr (Replace('2520.365','-',''),'. ', 1)-1), 12, 0)
|| RPAD (substr (Replace('2520.365','-',''), InStr (Replace('2520.365','-',''),'. ', 1) + 1), 6, 0) twice;

+ 000000002520365000 (exit)

Hope this can help you

Kind regards

Phanikanth

Tags: Business Intelligence

Similar Questions

  • filters, constraints, and the transformations in odi

    Hello
    When I want to add a condition I can do
    (1) adding constraints and references with this data store or
    (2) creation of filters in the diagram
    So, what is the difference between these two?

    (b) how business rules and integrity constraints are different transformations in odi?
    PDF, said business rules and integrity constraints can be checked at the level of data extraction and
    transformations can be done by loading data to target using the features of target database

    Jin
    one)
    wrong explain this with an example.

    If I create a filter to tell the age > 18

    Then all the records that have the age< 18="" will="" not="" be="" processed="" at="" all.="" in="" other="" words="" this="" data="" does="" not="" even="" enter="" the="" flow.="" its="" like="" stopping="" it="" at="" the="" entrance.="" mostly="" used="" when="" we="" do="" not="" want="" some="" data="" to="" be="" processed="" at="" all.="" say="" for="" this="" example,="" a="" person="" less="" than="" 18="" cannot="" be="" married.="" so="" we="" dont="" need="" to="">

    But if you define a constraint saying age > 18 on target then all records with the age below 18 are moved to the error table. In contrast to the filter, all the data are processed. During the flow, constraints are checked and we have options(Flow/static) to either move the records to the table of errors only. or (table errors as long as target table)

    Filters are generally defined on source.
    Constraints are usually defined on the target.

    (B)
    Another example.
    The rules are certain conditions that you can set using "forced" feature in ODI. Here, we can apply this business rule to catch false documents.
    Ex: age > 18.

    Whereas a transformation (made in the mapping) is something like this

    If your source stores the name of the Middle first, 3 columns, family name
    But in the target you want to that they all in a single column. So can you put a strain? (No right? to the max you can put a strain that name can't have digital)
    This is achieved by mapping or transformation
    (first | | middle | | family name)

    Hope its clear.

  • Loading data to Essbase with ODI rules file

    Hi all

    I need to load the flat file DATA (no metadata) or an Oracle table in to ESSBASE using ODI.

    Where can I find an example or a tutorial on the loading procedure.
    I have not have how to use ODI with a rules file:

    (1) in the standard rule file I can insert a transformation (join, split ecc.) can be used
    a rule like this in ODI file?

    (2) if I put the file of IKM SQL for Hyperion Essbase (DATA) rules I have to manually set the mapping
    between the source and target? the mapping is not set in the rule file?

    (3) can I use both the type of rules (flat file or SQL) file?


    Thanks a lot for your help!

    Edited by: 882454 on 19-game-2011 2.57

    Edited by: 882454 on 2.58 19-game-2011

    If you go to the next page in my blog, you should see a link to all the different posts around ODI and hyperion knowledge modules - http://john-goodwin.blogspot.com/2011/08/odi-series-summary.html

    In ODI, you can do all the transformations, the rule of the load is really used to optimize the process of loading the data.
    You must configure your interface with source and target mapping, and then create a rule to load that corresponds to the mapping of the target.
    You can use any type of source.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • ODI vs rule file load

    Hi all

    I would like to know the difference between the loading data to essbase directly using files of rules from a flat file or an RDBMS and load using ODI.
    And using rule files in interface ODI to load the data, what kind of performance and efficiency can be achieved with it.

    Thank you

    The choice is really yours, I'm not sure you how many performance advantage you would see ODI not use with a rule of load, sometimes it is just better to test and see.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to disable the Transformations?

    Hello

    Is it possible to enable\disable transformations in odi 11g?

    How to enable\disable transformations in odi?

    Please help me...

    Thank you for fishing,

    A.Kavya.

    Hello

    Based on what you hear – you can uncheck "Active Mapping" on the column of the target data store if you want to ODI to ignore it?

  • FDMEE requires ODI agent for simple file loading?

    Hello

    I have my agent ODI isn't working because of a problem with OS. I am trying to upload a simple file using FDMEE. When I try to run data load rule he says this ODI agent fails.

    My question is:

    FDMEE requires ODI agent even for simple file loading? FDM does not require us agent of ODI for simple file loading.

    Concerning

    Yes, as I mentioned in my previous post THAT FDMEE is built on top of the ODI, so she run ODI scenarios for all flows of integration

  • Parallel processing in ODI

    Hi experts,

    I have 30 + files in text format, that contain the partitions of the same table. These partitions can / must go through the same parallel processing and must then be added to one big file.

    I would have no problem in designing the transformations in ODI (since I have the SQL code), but I'm looking for "elegant" way solve the problem. By elegant I mean modular, with minimal work replication, etc.

    Thank you very much.

    Joan

    1. create a dummy data store in ODI with column structure imitating the structure of your file under file template
    2 duplicate this data store in the Oracle model.
    3 duplicate the LKM file to oracle using the charger and modify it so that the two target table and data path/file come from options KM (add these options if they are not already).
    4. develop an interface with these data banks and new LKM. Use an IKM that makes a straight line create a target table and load without worrying about creating I$ (IKM SQL append seems ideal, but you may need to change in order to ensure that the target table is variable). Use two variables (var2 and var3) to specify the new options in LKM (and if necessary IKM).
    5. create a scenario.
    6. create an Oracle table that contains a sequence, the target_table_name and the source_file_with_path.
    7. create a package, which defines the variable (say var1) to 1, use two other variables to store target_table_name and source_file_with_path based on var1 and call your scenario. Check for error and success, var1 and loop increment.
    8. in the end, create your large table with partitions and write an ODI procedure to loop through the tables to the target and make a partition change.

    This is the more modular approach, I can think.

  • Creating a rule that monitors each carrot in a host

    HI -.

    I'm new to Foglight and trying to create a rule that is triggered if an individual soul on a multicore Linux usage exceeds a given threshold. I already have a rule that follows the overall use of the machine, but there is a desire for the end user to know if one or more hearts are too busy.

    Can someone give me some advice about the particular syntax of topology and the rule that would allow me to follow individual basic info? For global use the topology that I use is

    Host.CPUs where monitoredHost.name like '% machinName % '.

    and as a rule I've got

    AVG (#utilization) for 5 min # > registry ("Average_CPU_Util_Warning")

    It feels like the foregoing, topology must be correct, and the rule should be a loop on the number of cores and returns the value true if one is too high. Something like (I am also climbing the groovy learning curve):

    for i in 0.. #numberOfCores #.

    {

    If avg (#core.utilization for 5 min #) > registry ("Per_Core_CPU_Util_Warning")

    {

    Returns true

    }

    }

    return false

    Advice would be most appreciated.

    Thank you

    -Craig

    As John, the metric to be tested is in the list of processors under Host/HostCPUs.

    It's so much easier just to scope of your rule of "transformer":

    Processor where monitoredHost.name like '% machinName % '.

    The condition can be simply:

    AVG (#utilization) for 5 min # > registry ("Per_Core_CPU_Util_Warning")

    Kind regards

    Brian Wheeldon

  • Essbase EAS data vs ODI Essbase data load, which is the fastest?

    To load the data (no metadata) of flat file for Essbase, we have 2 ways, we're ODI, one is data load EAS, which is faster for loading data?

    Hello

    If you use the method of rule no load in ODI EAS will be faster.
    If you have ODI patched to 10.1.3.5.2_02 or newer (I recommend you be on the latest patches) and the use of the method of rule load then the speed should be similar to EA that it uses the same way of loading data.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • SQL for Essbase (Metadata) with ODI

    Hi all...

    I'm trying to load the metadata in Essbase by using a rules file... When I load the metadata using the rule file in Essbase, it shows me all the size and fields well... I like... But when I try to do the same thing using ODI... Laughing out loud!!! It creates only the dimension and the fields appear as the way in which it has been entered in the table sql... ie a field consists of a line of the table created for the file of rules...!

    Can you help me to know where I am going wrong?

    Please let me know if you need more information to help me...

    Any suggestion would be marked quite useful...

    Thank you...
    Susan

    Hello

    When loading SQL, you will need to have defined delimiter as the decimal point in both the rule file and in ODI, I wrote another [blog | http://john-goodwin.blogspot.com/2008/11/odi-series-loading-sql-metadata-and-its.html] on this subject goes into why it is no longer possible to use commas.

    Ok?

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Transform a user created the system of coordinates to Oracle supplied one

    Hi all

    I'm looking to transform an obsolete network National British Ordnance Survey projection, so that the data that contains the obsolete projection can be queried using coordinates gird National British.

    I think I need to insert an entry in the table SDO_PREFERRED_OPS_USER and not SDO_PREFERRED_OPS_SYSTEM. However I do not know what value to use for the COORD_OP_ID. Is the COORD_OP_ID value related to the SOURCE_SRID, which is the obsolete projection; the value COORD_OP_ID for the TARGET_SRID or a new value?

    I I take then insert another line with the SOURCE and the TARGET of the swapped SRID round so that changes may occur in the sense the other way around.

    Kind regards

    Tim

    Generally, you don't need any rules of transformation between two screenings. The system automatically performs the reverse projection, datum transformation and projection forward then. In addition, even if a projected SRID is now considered to be obsolete, this does not change the fact that the system can determine a default transformation approach. For most applications, the default value is right.

    Do you need a rule, however, if the default processing line is not what you prefer. For example, if you want to convert between NAD27 and NAD83 using NADCON and not the transformation of default reference, you need an appropriate rule. If this is the case for you, please let me know and I can help you with the rule.

    Regarding the choice between SDO_PREFERRED_OPS_USER and SDO_PREFERRED_OPS_SYSTEM: If you use the system, it will become the default for all users of space in your DB. If you must use a string of personal transformation that you don't think that other users of your database would agree with, then SDO_PREFERRED_OPS_USER is appropriate. The user is a tag of your choice VARCHAR2, not a database user. Other users of the database can share your setting, if they use the same tag.

    SOURCE_SRID, TARGET_SRID and OP_ID should be consistent. If in doubt, please let me know your specific processing needs, and I can provide you with a rule.

    For your specific example, I need more in detail to determine if you need a rule, at all. It seems that you can not. Please let me know source & target SRID, and why you think you need a default transformation.

    Thank you

    Mike

  • Data loading convert timestamp

    I use APEX 5.0 and download data wizard allows to transfer data from excel.

    I define Update_Date as timestamp (2) and the data in Excel is 2015/06/30 12:21:57

    NLS_TIMESTAMP_FORMAT is HH12:MI:SSXFF AM JJ/MM/RR

    I created the rule of transformation for update_date in the body of the function, plsql as below

    declare

    l_input_from_csv varchar2 (25): = to_char(:update_date, 'MM/DD/YYYY HH12:MI:SS AM');

    l_date timestamp;

    Start

    l_date: = to_timestamp (l_input_from_csv, ' MM/DD/YYYY HH12:MI: SS AM' ");

    Return l_date;

    end;

    I keep having error of transformation rule.  If I do create a transformation rule, it will ask for invalid month.

    Please help me to fix this.

    Thank you very much in advance!

    Hi DorothySG,

    DorothySG wrote:

    Please test on demand delivery data loading

    I stick a few examples to the Instruction of Page, you can use copy and paste function, it will give the same result

    Please change a coma separator ',' on the other will be message "do not load".

    Check your Application 21919. I changed the rule of transformation:

    Data is loading properly.

    Kind regards

    Kiran

  • Question about KM options

    We are developing standards for a new implementation of ODI 12 c, to replace the former ETL and one of our developers strives encapsulate a lot of code in the module of knowledge to keep the designs of simpler mapping for developers by adding lots of Options that change the execution in the Module of knowledge, according to which options are selected.  Some of them include text strings that also pass in as parameters.

    My thoughts are that it will involve changes to the Module knowledge in the future, if its of bugs or having to extend the functionality of the Knowledge Module, will require all scenarios that use it to be regenerated.  Is this a valid hypothesis?  In addition, in my mind, it's obscuring the design, even if its intention is to make it easier.

    Use options like this to run the conditional code in the Module knowledge a good way to develop reusable or not?

    Hi Darren

    Customization of KM is happening in almost all of the project, unless the customer is opposite.

    [Darren] Instead of using some of the Visual components, for example, an aggregator for a max value, they try to automatically generate this km based on an option.

    [NK] In fact, up to ODI 11 g, we did not have the components of Visual transformation in ODI, aggregation (or any function level column) has been implemented by mention in the map and the KM used to create the query accordingly (e.g. group area was added to the list of all the other columns). I think that this approach still works in ODI 12 c.

    If you decide to go forward with the customization, you can check which is the team:

    • don't re - implement what is already available in odi
    • following the standards of odi
    • documents every change
    • documents the results of test
    • following the appropriate change management (whenever people should not change want without informing other people and without updating the documentations)

    For all the benefits which provides customization, a major drawback is:

    ODI can provide again updated with each update per kilometre. During the migration to a higher version of ODI (or database), you will miss out on these improvements unless you customize the new KMs again.

    Concerning

    Christian love

  • Reusable functions?

    Is it possible for me to write some JavaScript functions to which all my rules and transformations can visit his profile?  Currently, I am cutting and pasting in each script.  I hope that there is a better way.

    -Eric


    Hi Eric,.

    The "functions/methods" dialog 'Custom libraries' list to create publicly exposed methods/functions, which can be selected in the dialog box "Scripts of custom transformations". Of course these function names must match the names of real functions in the code. They will be detached from your tasks. Other functions (not exposed in this example) in the code will be common code, used on many places is called/appellant/from other functions.

    I attached the below code and screenshot

    It is a very simple example of library with functions:

    That's how you use it in the script transformation dialog box

    Here is the code

    // this is publicly exposed
    function doSomeImportantThing() {
    // your logic goes here
    tables = model.getTableSet().toArray();
    for (var t = 0; t
    

    I guess that's what you're looking for

  • Rivers of the name of the other table?

    Hi all.. I would like to ask something about the configuration of the oracle workflow

    so say like this:

    -J' have 2 schemas and I want to schema1.jobs streams in schema2.dim_jobs

    -Use table to schema1 have 5 columns (id, name, address, city, phone)

    -dim_jobs table schema2 have 3 columns (id, name, address)

    I already give the rules of the table, spread, collection procedure and apply processes...

    but when I add some data in schema1.jobs the application of the schema2.dim_jobs process does not

    should I insert this code of schema1 configuration?

    BEGIN 
      DBMS_STREAMS_ADM.RENAME_TABLE(
      rule_name => 'strmadmin.jobs_change',
      from_table_name => 'schema1.jobs',
      to_table_name => 'schema2.dim_jobs', 
      step_number => 0,
      operation => 'ADD');
    END;
    /
    

    Thank you

    Hello

    In this case, please refer below doc:

    Transformations of based on declarative rules (Doc ID 428267.1)

    How to set up the custom rule based Transformation (Doc ID 783203.1)

    And let me know in case of any concerns.

    Thank you

    Reena

Maybe you are looking for

  • the sidebar has disappeared after the release of firefox 5.0-6

    I've been using the extension all-in-one sidebar, he worked until FF5.0. But after the 6.0 update today, I can't even see the ability to turn on a sidebar, either all-in-one or just out of the box canceled one. That's happened?

  • Random BSOD on Satellite A500-1E4

    I get random errors of the kernel data inpage / Ntfs.sys type BSOD on my psar9e Satellite A500-1E4 Memtest is fine, Hard drive is a ssd corsair-ish (I know, guaranteed broke probably change the disc had mistakes on the old disk)Old drive is eSata con

  • Windows Update depends on Net meeting?

    original title: Up Date dependicies Program: Net session. Is Microsoft updates depends on the program: Net meeting. I get an etc error code. I got in. had with indigestion on this HP Mini and has deleted the command line Net meeting and Movie Maker,

  • OS does not start and screen with the error (root) system32\hal.dll windows is damaged or missing black

    I was trying to stop some HP programs to start when I start my desktop computer. I did the following: start > run > msconfig.  Click on startup and unchecked HP four applications. Restarted my desktop computer and immediately had a black screen with

  • Empty basket are not not in the program events

    I can't assign a sound to my trash emptying, because it is more listed in the program events as it was once. How do I add it to this list so I can assign a sound? I tried several Restore Points, but that has failed.