How to use the transformation script to add columns to the PK?

I'm working on a script transformation that:
-create a table
-Adds the columns to the table
-create a primary key for the table

See the below script.
Now, I want to add the primary key column.
Documentation fix r: class IndexColumnUsage

The Index of the class has a getter: getIndexColumnUsageList()
and the list apply: applyIndexColumnUsageList

Someone at - it an idea how to use these methods to add the column to the PK?

I thank in advance.


relational = model.getDesign () .getFirstOpenRelationalDesign ();
table = relational.getTableSet () .createTable (null);
table.setName ("TABLE");
column = table.createColumn (null);
column.setName ("COLUMN");
index = table.createIndex (null);
index.setName ("PK");
index.setIndexState ("primary obligation");

Hello

If you have the column and index (both belonging to the same table) use:

the index. Add (Column);

to remove the column:

the index. Remove (Column)

Philippe

Tags: Database

Similar Questions

  • How to use the @accum function in the calculation script

    Dear all.

    I'm new in essbase - calculation script so don't know how to use the @accum function.

    I want the aggregation value of child to parent

    Hierarchy

    Product

    100 > Storage Dimensions marked as stored (marked as intentionally as I want to calculate the value using the calculation script)

    100. 10 (+)

    100-20 (+)

    100-30 (+)

    I'm trying calculation Script

    100 = @Accum (@children("100"), jan: Feb);

    It works when I use below

    100 = @Accum("100-10",Jan:Feb);

    Error:-number of Dimensions [1] does not match number of gen/lev [3] office [@Dim]

    Don't know how I can roll up to an aggregate value of all the members of the child to the parent.

    Error.PNGhierachy.PNG

    you do this more difficult it must be. If you want to accumulate up to 100 then you could just make your calc

    '100 '.

    but that would be only 100, to make the OU any dimension would

    AGG (Product);

    Or better yet

    AGG (Product, Market);

  • How to use the import with FDM with adapter ERPI script?

    Hello

    I use FDM and ERPI 11.1.2 to load data of EBS R12 to planning 11.1.2

    Loaded from eBS data for a YEAR.

    I realized I could use an import script to manually calculate the amount with the periodic_net_cr and periodic_net_dr fields.

    But how to use this import script? Because in my import in FDM format, I do not use a file but directly the adapter, if no field "Expression".

    Thanks in advance for your help

    Fanny

    You must use the ImportAction script.

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use the adapter from the wall with my Mac Pro laptop?

    How to use the adapter from the wall with my Mac Pro laptop?

    The AC wall connector is not compatible with the outlet on the MBP?  As the MBP charger will work from 100v to 240v, a transformer is necessary.  You need a converter that connects to the power outlet home and is compatible with your MBP.  You can buy the Apple travel kit:

    http://www.Apple.com/shop/product/MD837AM/A/Apple-world-travel-adapter-Kit

    Or you can use a single specific converter for the geographical area:

    http://www.Amazon.com/orei-grounded-universal-adapter-Singapore/DP/B004SCSV2U/re f = sr_1_4? ie = UTF8 & qid = 1460735377 & sr = 8-4 & keywords = us + in + uk + power + adapter

    (it is a UK USA example)

    Or you can get the converter that adapts the charger directly:

    http://www.Amazon.com/HIOTECH%C2%AE-extension-charger-connecting-specification/d p/B00MA48JZW/ref = sr_1_3? ie = UTF8 & qid = 1460735486 & sr = 8-3 & keywords = us + in + uk + power + ad aptor + apple + charger + cord

    (again, this is for a UK plug.)

    Ciao.

  • How to use the model taskflow

    For some of my workflow, I want to check something before running the workflow. If I I could use taskflow model but I don't really understand how it works.

    In my workflow model, I have a router that has 2 results a default result refused and the other with an expression with a result obtained. Then, I created a stubborn workflow based on this template.

    Q: how associate you the result of the router in the model entry in the btf child?

    What I don't understand is how to use the result of the router.

    Note: I want to use the flow of tasks as a reference model not copy

    Thank you

    JDev 11.1.2.4

    Try a wild-card navigation and add the result to the wildcard and point to an appropriate page.

    Timo

  • I don't know how to use the method (PDDrawPageOrCosObjectToBuffer) in the Mac environment.

    Use the method of PDDrawPageOrCosObjectToBuffer of Acrobat SDK from DC () in the Mac environment,

    I want to get a screenshot of the PDF in the bitmap to the screen.

    A description of PDDrawPageOrCosObjectToBuffer () in Acrobat DC SDK API references, but I do not understand how to use the method.

    Please tell me this use.

    If there is a code example using PDDrawPageOrCosObjectToBuffer (), I'm happy.

    Hello

    My code is finally working with PDDrawPageOrCosObjectToBuffer. I hope it helps someone:

    void releaseBufferForCG (void * / * info * /, const void * data, size_t / * size * /)

    {

    Free ((void*) Data);

    }

    CGImageRef CAcrobatBitmapCreator::ConvertToBitmap (const PDPage & i_rPDPage,

    ASFixedMatrix & i_rTransform,

    int & i_rBitmapWidth,

    int & i_rBitmapHeight)

    {

    Get the rect in user-space coordinates update

    ASRealRect updateRectReal = {0,0,0,0};

    ASFixedRect boxFixed;

    PDPageGetBBox (i_rPDPage & boxFixed);

    updateRectReal.top = ASFixedToFloat (boxFixed.top);

    updateRectReal.left = ASFixedToFloat (boxFixed.left);

    updateRectReal.right = ASFixedToFloat (boxFixed.right);

    updateRectReal.bottom = ASFixedToFloat (boxFixed.bottom);

    Convert the fixed transformation matrix to real

    ASRealMatrix transformReal = {0, 0, 0, 0, 0, 0};

    transformReal.a = ASFixedToFloat (i_rTransform.a);

    transformReal.b = ASFixedToFloat (i_rTransform.b);

    transformReal.c = ASFixedToFloat (i_rTransform.c);

    transformReal.d = ASFixedToFloat (i_rTransform.d);

    transformReal.tx = ASFixedToFloat (i_rTransform.h);

    transformReal.ty = ASFixedToFloat (i_rTransform.v);

    ASRealRect destRectReal = {0, i_rBitmapHeight, i_rBitmapWidth, 0}; l, r, t, b

    Prepare the buffer for drawing https://forums.adobe.com/thread/1850089

    This first call to PDDrawPageOrCosObjectToBuffer is only used to get the size of the buffer.

    ASCab flags = ASCabNew();

    ASInt32 bitsPerChannel = 8;

    ASUns32 bufferSize = PDDrawPageOrCosObjectToBuffer (i_rPDPage,

    CosNewNull(),

    ASAtomFromString ("DeviceRGB"),

    NULL,

    NULL,

    bitsPerChannel,

    flags,

    9,

    NULL,

    & transformReal,

    & destRectReal,

    & updateRectReal,

    NULL,

    0,

    (NULL);

    char buffer = (char *) malloc (bufferSize);

    Memset (buffer, 0xff, bufferSize);

    Draw in the buffer

    ASCabPutBool (flags, kPDPageUseAnnotFacesStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothTextStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothLineArtStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothImageStr, true);

    bufferSize = PDDrawPageOrCosObjectToBuffer (i_rPDPage,

    CosNewNull(),

    ASAtomFromString ("DeviceRGB"),

    NULL,

    NULL,

    bitsPerChannel,

    flags,

    9,

    NULL,

    & transformReal,

    & destRectReal,

    & updateRectReal,

    buffer,

    bufferSize,

    (NULL);

    Convert buffer CGImage

    // 1. Remove the 4 bytes of padding at the end, in a new buffer.

    size_t bytesPerRow = (i_rBitmapWidth * 3);

    bytesPerRow = (bytesPerRow % 4 == 0? bytesPerRow: bytesPerRow + (4-(bytesPerRow % 4)));

    size_t bytesPerRowForGC = i_rBitmapWidth * 3;

    size_t bufferCGSize = bytesPerRowForGC * i_rBitmapHeight;

    char * bufferForGC = (char *) malloc (bufferCGSize);

    Memset (bufferForGC, 0xff, bufferCGSize);

    for (int lineIndex = 0; lineIndex)< i_rbitmapheight;="">

    {

    char * destGCPtr = bufferForGC + (lineIndex * bytesPerRowForGC);

    char * srcPtr = buffer + (lineIndex * bytesPerRow);

    If ((srcPtr + bytesPerRowForGC)<= (buffer="" +="" buffersize)="" &&="" (destgcptr="" +="" bytesperrowforgc)=""><= (bufferforgc="" +="" buffercgsize)="">

    {

    memcpy (destGCPtr, srcPtr, bytesPerRowForGC);

    }

    on the other

    {

    break;

    }

    }

    // 2. Create a CGImage using the new buffer.

    CGDataProviderRef provider = CGDataProviderCreateWithData (NULL,

    bufferForGC,

    bufferCGSize,

    releaseBufferForCG); Buffer are ions released this reminder

    Space color CGColorSpaceRef = CGColorSpaceCreateDeviceRGB();

    CGImageRef finalImage = CGImageCreate (i_rBitmapWidth,

    i_rBitmapHeight,

    bitsPerChannel,

    bitsPerChannel * 3.

    bytesPerRowForGC,

    color, space

    kCGImageAlphaNone,

    provider,

    NULL, / / decode (of remapping the colors)

    true, / / interpolate (pixel smoothing)

    kCGRenderingIntentDefault);

    CGColorSpaceRelease (colorspace);

    CGDataProviderRelease (provider);

    Free (buffer);

    FinalImage return;

    }

    David

  • How to use the data object 'DatastoreHostMount '.

    I train to iterate on the grouping value in vCenter and for each data store found, determine whether a host has mounted data store or if it is visible to the host. I am using data object 'DatastoreHostMount' , but I don't know exactly how to use the object to retrieve the name of host configuration.

    Here's the perl code snippet and I get an error for:

    #get all hosts within cluster and check the connectionState and compare with all datastores found
    #is there a more efficient way to combine this section with the next section?
    
            my $hosts = Vim::get_views (mo_ref_array => $cluster->host);
    
            foreach my $host (@$hosts) {
                    if ($host->runtime->connectionState->val eq 'connected') {
                            my $datastores = Vim::get_views (mo_ref_array => $cluster->datastore);
                            foreach my $datastore (@$datastores) {
                                      print "  Datastore ", $datastore->host->summary->config->name,"\n"
                            }
                    }
                    elsif ($host->runtime->connectionState->val eq 'disconnected') {
                            print "\t|", $host->summary->config->name, "|Disconnected|\n"
                    }
                    elsif ($host->runtime->connectionState->val eq 'notResponding') {
                            print "\t|", $host->summary->config->name, "|Not Responding|\n"
                    }
            }
    

    Cannot call method 'Summary' on some wrapping 71 de./listCluster.pl.

    Disconnection of the end

    =========================================================================

    -William

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    OK, I remembered how it works. Sorry for the noise:

    |

    My $datacenter = Opts::get_option ('Center');

    My $datacenter_view = Vim::find_entity_view (view_type = > 'Data center',)

    filter = > {name = > $datacenter});

    If (! $datacenter_view) {}

    Die "data center" "» $datacenter. "" not found\n ";

    }

    My $cluster_views = Vim::find_entity_views (view_type = > 'ClusterComputeResource',)

    begin_entity = > $datacenter_view);

    My $counter = 1;

    Print "Clusters found: \n";

    {foreach (@$cluster_views)}

    Print "$counter:". "." $_-> name. "\n";

    My $datastores = Vim::get_views (mo_ref_array = > $_-> data store);

    foreach my {$datastore (@$datastores)}

    my $instances = @{$datastore-> host};

    my $instance = 0;

    while($instance < $instances) {}

    My $x = Vim::get_view (mo_ref = > $datastore-> Home-> \[$instance\]-> key);

    print $datastore--> summary-> name, "Datastore", $x-> name, "\n";

    $instance ++;

    }

    }

    $counter ++;

    }

  • How to use the ESD document with structured templates

    Hello

    I started to learn working with SEDD. I have an existing ESD, now I'm suppose to use it to create documents. I created a new book and imported this ESD file to it. I can see all the items in the catalog of the element. But when I start to add items to the book and add a new document, the elements are turning to red. Referring to the User Guide, it is said EDD cannot be used directly and must be used with structured patterns. But I do not have these models structured with me. Can someone please tell me how to create these structured templates and how to use the ESD file with these models, and out of this problem.

    Thanks in advance.

    Although ESD exist in the form of a separate document, the only way that it can be used is when it is part of the model. As a model of structured FrameMaker, a structured model contains master pages, pages reference, character formats, paragraph formats, etc. IN ADDITION, a structured model contains a DSP. To add the EDD to your template file, or any document FrameMaker who will use it, open the template file and the file of ESD. Click anywhere in the template file, and then select file > import > element definitions. In the dialog box, select the EDD file as source and click Import. Then save the template file.

    To use the template file, open it and save it as a FrameMaker document, giving it the name you want. You can now create your structure.

    If you use a book, all documents in the book must use the same ESD. Open the template file. In the book file, select all the documents in the book. Then select file > import > element definitions. In the dialog box, select the template file and click Import. Once completed, all documents in the book have the same ESD. In addition, ESD is copied into the file of the book itself.

    You say:

    But when I start to add items to the book and add a new document, the elements are turning to red.

    It is is not clear to me what you do. While it is true that SOME elements of a book are in the book file, you cannot add a book of items in the folder (at least not as far as I know). In general, the book file, it encapsulates elements around the documents root elements in the book. You may need to update the book to get a part of the Red disappear lines. You may need to rearrange items in the structure of the book to remove the red lines.

    Hope this helps,

    Van

  • How to use the goto function?

    How to use the goto function in indesign javascript?

    my script begins by chekcing if the input files are present or not... If one of the input files is not present, I want the n function put an end to the operation in the display of the message tht file exists... I was wondering to use goto for tht... then how to use it? or is there an alternative to that?

    GoTo is generally frowned upon by the programmers.

    The only legitimate use of goto is when you need to escape from a nested loop.

    If you need to jump into a routine, use break or simply in return from the current function.

    The model currently used by the SDK looks like this:

    do
    {
         if(condition1 == false)
              break;
         if(condition2 == false)
              break;
         if(condition3 == false)
              break;
         doSomethingReallyCool();
    }while(false);
    

    'break' the jumps at the end of the do / while loop that always comes out when you reach the end of it (while (false))

    Substances

  • With no headphone jack, how to use the iPhone in my car 7

    Okay, so here's the challenge.  I have a power source and a headphone and not Bluetooth.  It works perfectly with iPhones before 7.  But with 7, it isn't possible to use the same configuration I had for years.  I own my car, and I have no interest in buying a new car just to support a new phone.  And since this will be a problem for the years to come if I stay with Apple, I would like to know what are the solutions are available.

    So, how to use the new iPhone 7 while remaining responsible and using my car speakers?  Dongles Bluetooth that I need to reload, it's probably not.

    Thus, looking for ideas that might have people.  I can't be the only one with this concern.

    It's almost a certainty that a third party adapter will appear quickly. The new Macbook has a single port usb - c and people asked the same question, 'how to load and use USB at the same time." There are today dozens of solutions for the Macbook, and then it will be with the iPhone 7. An adapter with a 3.5 mm jack and a port of loading Lightening would be my guess. Kickstarter entrepreneurs are probably already working on it.

  • How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    Download and run MalwareBytes. Malwarebytes was developed by one of our colleagues here to ASC. He received rave reviews and is on the more proven anti-malware for Mac software.

  • How to use the utility disk first aid for hard drive internal el captian

    How to use the utility disk first aid for hard drive internal el captian

    Select the drive and click first aid.

    If something is not repairable because this is the system drive, then you need to start using the recovery partition and run disk utility it.

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • How to use the acronym

    How to use the acronym instead of this?

    Please explain

Maybe you are looking for

  • Menu has no add-on button

    I want to manage the Add-ons of which I already added. By clicking on the Menu, I get a window but there key no. module, so I can't go to the Manager. I don't see 2 lines which resemble options help and 9 icons and then 2 lines more things - access c

  • Satellite A100-TA9: failure of the power supply cord - where to get a new

    Recently my power cord has stopped working on my Satellite A100-TA9 system.My system warranty has expired and passes through 'Authorized support vendors' Toshiba was useless. Anyone know where I can get a replacement power cord?I live in Toronto, Can

  • Google Earth crashes the driver Intel graphics accelerator on Lenovo Tablet K3011W

    Hi, I bought a Lenovo K3011W Tablet to be able to check the Google Earth maps on the road. Everything works fine, only Google Earth crashes the Intel graphics accelerator driver. It's obviously a serious driver problem! I tried different versions of

  • CQ 61: Please help me

    Can help me my laptop 73257741 disable

  • Windows Connect

    I seem to be having problems with my laptop, connect to the microsoft server. It is a Toshiba Satellite bought last year. I just did a system restore and if I can connect to the internet and all other sites, nothing works from microsoft. I can't conn