Need help to write mapping script in OVD

Hi All,
I have a requirement to write a mapping script in python that can rename the attributes of OVD.
ex: cn with mycn, sn with mysn etc.,
Here is the code I have written to achieve that:
class MapperAttributeRenameClass(Mapping):
iattributes = {'rcn':'cn','rsn':'sn','ruserPassword':'userPassword'}
oattrubutes = {'cn':'rcn','sn':'rsn','userPassword':'ruserPassword'}
def inbound(self,mapUtil):
"@sig public void inbound(com.octetstring.vde.chain.plugins.mapper.MapperUtil mapUtil)"
mapUtil.renameAttribute(self.iattributes)
def outbound(self,mapUtil):
"@sig public void outbound(com.octetstring.vde.chain.plugins.mapper.MapperUtil mapUtil)"
mapUtil.renameAttribute(self.oattributes)
Can anyone help me how to go about it as I am new to Python?
Regards,
Sunil Kumar

Hi
If you are unix user...
you can use script like below:
# $2 is the output filename, $1 is the .sql script
runsql()
    sqlplus -s user/passwd/@somewhere <<EOF  > $2
    start $1
    exit
EOF
runsql file1.sql logfile1 &
runsql file2.sql  logfile2 &
runsql anotherfile.sql logfile3  &
wait

Similar Messages

  • Applescript: Need help to write a script that inputs an excel formula into multiple workbooks.

    Don't know if I can do this with automator or if I need to write a scipt I have a folder which contains probably 20 excel workbooks and each workbook needs the formula "=CONCATENATE(E17, " ",TEXT(N11, "mm-dd-yy"))" into cell T18 in every sheet of each workbook. Any ideas?

    well, the operative line is this:
                                  set formula of cell "T18" to "=CONCATENATE(E17, \" \",TEXT(N11, \"mm-dd-yy\"))"
    you just need to loop through the workbooks and worksheets and apply it to each.  I think you can figure that out.

  • Can anyone help me write a script that would click "get info" and then "enter" on each movie in my itunes library? I am asking because my itunes 11 repeatedly loses the artwork to my movies in my itunes library.

    Can anyone help me write a script that would click "get info" and then "enter" on each movie in my itunes library? I am asking because my itunes 11 repeatedly loses the artwork to my movies in my itunes library. I can restore the artwork (and make my apple tv see the movie exists as well) by going into the movie library and clicking on each movie by hand, slecting get info, and then selecting enter. Now doing this 10 times in 20 days was fun and all BUT I would really like to automate the process so everytime itunes screws it up I can fix it easier.
    I saw this example of an itunes script that restores artwork for music
    tell application "iTunes" set theSelection to selection repeat with i from 1 to count of theSelection tell (item i of theSelection) set artworkCount to count of artwork repeat artworkCount times set theArtwork to data of artwork 1 delete artwork 1 set data of artwork artworkCount to theArtwork end repeat end tell end repeat end tell
    but I need to tweak this to fit my needs for simply clicking the "get info" button and "enter" in the movie library rather than all the stuff this guy has listed. Any ideas or help on writing this? Thanks.

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Need help in modifying mapping parameters of out the box mapping

    Hi There,
    I am a new bee to dac.
    Need help in modifying mapping parameters of out the box mapping, which is invoked by DAC task.
    We got a requirement to edit mapping parameter. When I go and see parameter under mappings tab in a mapping, I could not see any values in it.
    But when I set any value, and validate it. It is successful.
    Is it right way to do it?
    What my concern is, When I initially go and see parameter values under maapings tab in a mapping, they are blank.
    Where is it storing these values?
    Thanks,
    Rag

    If you modify mapping then u have to create new task in dac and dac itself craete parameter file at run time. if you want to add more parameters then do it in dac system parameters tab.
    Thanks
    Jay.

  • I need help with my mapping - CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV

    hi, guys, i need help with my mapping, i dont know this error (i not speak english)
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
    <Trace level="2" type="T">......attachment XI_Context not found </Trace>
    <Trace level="3" type="T">Mapping already defined in interface determination </Trace>
    <Trace level="3" type="T">Object ID of Interface Mapping 4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="3" type="T">Version ID of Interface Mapping 88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Object-Id:4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="1" type="T">Mapping-SWCV:88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Step:1 </Trace>
    <Trace level="1" type="T">Mapping-Type:JAVA_JDK </Trace>
    <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_mm_sgipi_fi001_vta_clientes_ </Trace>
    <Trace level="3" type="T">MTOM Attachments Are Written to the Payload </Trace>
    <Trace level="3" type="T">Dynamic Configuration Is Empty </Trace>
    <Trace level="3" type="T">Executing multi-mapping </Trace>
    <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
    help me please

    you can use the sharedobject to record a user/computer has taken your quiz, the session data and record their results.  at the start of your quiz, check for the sharedobject and, if it exists, check the other data and take appropriate action.

  • Need help making a simple script for my webcam

    Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
    I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
    tell application "CamTwist" to activate
    delay 10
    tell application "Photo Booth" to activate
    that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
    Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!

    Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
    tell application "System Events"
    tell application "CamTwist" to activate
    delay 0.5
    --Press command+b which is a user defined hot key to load webcam
    key code 11 using command down
    end tell
    delay 0.5
    tell application "Photo Booth" to activate
    My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone.

  • Need help with instruments mapping

    I have Korg PA80 and i hooked up midi out from it to midi in to Logic8, I have some nice realtime accompaniment tunes i can play on that keyboard, what i want to do is to play on my PA80 accompaniment tracks but replace all sounds with my custom sounds from my Logic plug ins, right now when I hit play all i hear is some garbage playing because no instruments properly mapped on Logic, I even created all 16 instrument tracks and set them all on all 16 channels, drums on 10 and so on, but when i start play on PA80 in Logic I still hear like bass trying to play all parts and not bass part only, same for drums when i press Am or Dm drums will play properly with some another drums sounds that trying to play all other instruments parts, need to separate them so the bass will play only bass part, drums will play drum part and so on, need help on how can i do that, lets say for drums i will choose logic drums sounds, for base Logic bases and so on, so Logic will become something like sound module for my PA80 instead of internal sounds I would like to use my virtual instruments sounds, thanks a lot

    Thanks for your reply Dave.
    I have no answer to your question but I found a way to create my SQL code with OWB mapping operators. Unfortunately it is very very slow compared to the execution of the SQL code and therefore not useful at all. I connected the following steps all in one mapping:
    1. Table operator(T006_SITE) -> Filter(T006A01PK_SITEID where T006A11FK_COUNTRYID IS NULL)
    2. Table operator(T002_COUNTRY) -> AGG (MAX T002A01PK_COUNTRYID)
    3. JOIN the output from 1. and 2.(T006A01PK_SITEID and T002A01PK_COUNTRYID))
    4. UPDATE T006_SITE with the output from 3. (T006A01PK_SITEID as matching column and T006A11FK_COUNTRYID as column to be updated)
    The execution mode of the mapping should be set-based fail over to row-based, but it used row-based mode even without getting an error. Are UPDATE mappings only executable in row-based mode or is there a way to change that?
    Does anyone have an idea how I can speed up that mapping or integrate my SQL code in the OWB?
    Thanks in advance,
    Dirk

  • Need help - I2C write/read with TAOS TCS3414 light sensor using USB-8451

    Hello, I'm new to labview and need help setting up a vi that will allow me to communicate with a digital light sensor (TAOS TCS3414) using a USB-8451. I need to use the sensor to measure light from a light source that I designed and built as part of a project im working on. I've tried looking at several labview I2C exampled but find them to be very confusing. I've used an arduino to interface with the sensor successfully but need to use labview and dont understand how to write the program. The actions are simple; I need initialize the sensor with a simple command and then request data from 8 data registers and then read that data. The data will then be used in further calculations. The portion i need help with is writing and reading from the sensor. I've attached the datasheet for the sensor as a guide. I can also provide the arduino code that i use to read data from the sensor if that would help. 
    Pleae keep in mind that i am completely new to labVIEW. I really do want to learn from this but need quick results so the more help the better. It would greately appreciate any help or explaination. 
    Attachments:
    TCS3414_Datasheet_EN_v1.pdf ‏1806 KB

    Hi Aaron,
    Here you go, this is made with a USB-8452.
    When you run the code tick the power en dac enable box on.
    Maybe you can help me with my problem, I want to use a fiber to sense light from a led.
    Do you use any fiber hardware with the TCS3414?
    gr,
    Attachments:
    TCS3414.vi ‏63 KB

  • New to Illustrator, need help creating a map?

    Need to create a map of a neighborhood.  New to program any help would be great!

    rdelaroca,
    There are vector maps available for many areas.
    Or you may work on a locked image from Google Maps or something including the important parts/themes/whatever, using the Pen Tool as the primary tool for shapes in general.

  • Need help writing and Apple Script

    I've never written an apple script before so I need the entire tutorial for dummies. Basically, I am annoyed with the fact that Microsoft Word 08 keeps opening a new document at 100% zoom when I want it to open at "page width." How do I write a script for that?

    You don't need an Applescript. Open the New Document template, resize as you like then save the template.
    To learn Applescript start here. You will also find support at the Applescript site for developers. Your local book store or Amazon.com have dozens of books on Applescript programming.
    Here's the main site for obtaining Applescripts.

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

  • Plz , need help on IDOC mapping

    Hi friends
    I need help on mapping IDOC (invoic02) to a customer fields to be sent to a printhouse .
    The idoc contains several Item lines , from 1  and up after for instance
    The fields  E1EDP01-MENGE and E1EDP26-BETRG  could be repeated many times , the customer wants  eah line item (quantity , price and subtotal )  in separate  lines.
    What is the best approach to do the mapping , and how can I loop in the idoc segments in order to get each line separetly.
    Many thanks in advance.

    Hi
    Thanks again , plz bear with me as i am new to this kind of assignment.
    This is a part of my requirement, so i suppose that I have to create a Data type as node for the customer fields corresponding to the node in IDOC and just map the source node to the target node , and it will repeat it self as many times as there is line items in the sales order.
    Customer fields              Idoc fields.
                        segment E1EDP01
    DETAIL_ANTAL     E1EDP01-MENGE  -  LOOP
                         segment E1EDP26
    DETAIL_STK_PRIS     E1EDP26-BETRG - QUALIFIER = 001- LOOP
    DETAIL_SUBTOTAL     E1EDP26-BETRG - QUALIFIER = 003 LOOP
    If I change the context of the source, will it not affect the source node at all.
    best regrads.

  • Need help publishing a php script

    I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
    The code looks like this now
    <?php
    $library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
    When I press the register button on the page I get this message:
    Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Warning: include_once() [function.include]: Failed opening
    'Zend/Validate/Stringlength.php' for inclusion
    (include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
    on line 16
    Before I had that file path I got this message:
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    Fatal error: require_once() [function.require]: Failed opening required
    'Zend/Loader/Autoloader.php'
    (include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    I am renting a server from domainnameshop.com (in norway)
    And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
    It is on norwegian, but it is the button that sais registrer that triggers the errors.
    I really need help on this, I can't find any solution on my own!

    I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
    The code looks like this now
    <?php
    $library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
    When I press the register button on the page I get this message:
    Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Warning: include_once() [function.include]: Failed opening
    'Zend/Validate/Stringlength.php' for inclusion
    (include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
    on line 16
    Before I had that file path I got this message:
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    Fatal error: require_once() [function.require]: Failed opening required
    'Zend/Loader/Autoloader.php'
    (include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    I am renting a server from domainnameshop.com (in norway)
    And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
    It is on norwegian, but it is the button that sais registrer that triggers the errors.
    I really need help on this, I can't find any solution on my own!

  • Please I need help with mokia maps!

    Hello! I have bought my phone Nokia N76 and I found nokia maps v 1.2 in it, I tried to install nokia maps v 2 but it says "update error"!
    when I tried to remove nokia maps 1.2 from the menu, it says unable to delete I tried this from the menu as it is not listed in the application manger list ! what shalI do?! . I don't wan't to update the software (it's the lastest). please if anybody knows help me please?
    Message Edited by Twilight28 on 23-Nov-2009 06:53 PM
    Message Edited by Twilight28 on 23-Nov-2009 06:54 PM

    Reading above posts I seem to remember that for early versions of Nokia Maps the map data is stored in E:\Private\20001f63\diskcache\ NOT E:\CITIES as for later versions, so try deleting these + .qf file. You would need to enable "show hidden & system" files on your PC to see these however.
    Provided that you carry out *#7370# or three finger reset (erases ALL data) after deleting these folder/files, you should really be able to install Nokia_Maps_2.0_4503_3.1.sis from here: http://nds1.nokia.com/files/support/global/phones/software/Nokia_Maps_2.0_4503_3.1.sis
    You would need to run Nokia Maps application to create folder structure on memory card required to download mapping.
    Happy to have helped forum with a Support Ratio = 42.5

  • Can someone help me write a script for Soundbooth

    If I have 50 files in C:\MyMusic and want to
    Match Volume in Soundbooth CS5 how can I write a script to do that?

    The only other way I've seen to do this with a library of that size is SoundConverter by Steve DeKorte. It would be time consuming to do, but there is a feature to "normalize volume" on all files being converted. Th other drawback is that as long as you are " converting" from mp3 to mp3, you have to save the "converted" files to a different directory. It won't overwrite during the normalization process.
    I had a library of more than 92,000 songs in 14,000 folders and 46,000 subfolders  up till last October. I had gone through it twice to "clean up and mormalize" it over six years' time. The transport seized on the drive as I was preparing to back everything up on DVD, and I was unable to recover the data on the discs when it happened. I was duly distraught when I lost all that music, but as I look back onthe last eight months, I've had a lot less hassles from "tinkering" with all those files all the time.

Maybe you are looking for

  • Running multiple files

    Hello I am trying to run multiple files with my java app on a Unix server. I compiled with javac, and run it thus: java SNL *.mef meaning I want to run all of the files with .mef suffix. Unfortunately it does nothing. If I just run one file at time t

  • I updated to iOS 6 and now some apps won't open what do I do?

    I need help, adding a new app doesn't fix the problem, neither does syncing.  I have also tried restarting the iPad, nothing seems to work.  I don't want to delete the apps and reinstall because they are games that I have been playing for a while and

  • System image,Restore

    Back In late Nov I created a system image, today I restored that Image successfully, not because I needed to. I created a filehistory and created a storage space and used the storage space drive for filehistory after I created my system Image. Anyone

  • Applel Tv

    How can I see my desktop on Apple TV

  • New Appstore Reverting to Old Appstore

    Ive just upgraded to IOS 6. The installation went ok and after a few hours my appstore reverted back to the ald appstore. I've tried rebooting my phone closing the app completely but nothing seems to fix the issue. Anyone else having this problem ?