table model

Hi all

I tried manipulate a table but failed.

At the present time, I have an array Ref: 1 2 3 4 5 6 7 8 9 10

and a measurement range: 4.2, 5.2, 8.2, 9.2.

The measured table will be compared with the ref and table if the table falls in the Ref, the value of the table measured range table will be saved, otherwise it will be filled with zeros.

Finally, the answer should be something like: 0, 0, 0, 4.2, 5.2, 0, 0, 8.2, 9.2, 0.

I managed to get to the 1st iteration and returns the result in form: 0, 0, 0, 4.2, 0, 0, 0, 0, 0, 0, but unable to go further.

What must I do to get the results of desried? I have attached a sample VI.

Can someone help me on this? One thing is that the measured two and table Ref will always be in ascending order, how do I get the code to run more efficiently?

Thank you!

Joven wrote:

Nope, it's not just number 1, 2... It is a number with decimals.

So why is he I32 then?

What is the meaning of your +/-0.3. You really need to define the problem better. If the ref table is not an integer, then make an example with more typical data.

Here's a quick draft using the reference table. Probably need some tweaks, but should help you get started.

Tags: NI Software

Similar Questions

  • Columns of the table model Transformation header/footer

    Hello @all,
    I'm new to this forum. I'm now starting to use Oracle SQL Data Modeler 3.1.0 - 700

    I found the "Table model" transformation. I use this transformation to model my header and footer columns. How can I create columns for my header on the first position of my table? Will there be another opportunity to create a header or footer?

    I hope you understand my question.

    Thank you for the help,

    Max

    You can use

    table.moveToIndex(column,index);
    

    to move the column that you created in the desired position - following moves the column to the beginning of the list of columns:

    table.moveToIndex(column,0);
    

    Philippe

  • Calc problem with fact table measure used in the bridge table model

    Hi all

    I have problems with the calculation of a measure of table done since I used it as part of a calculation in a bridge table relation.

    A table of facts, PROJECT_FACT, I had a column (PROJECT_COST) whose default aggregate is SUM. Whenever PROJECT_COST was used with any dimension, the appropriate aggregation was made at appropriate levels. But, no more. One of the relationships that project_fact is a dimension, called PROJECT.

    PROJECT_FACT contains details of employees, and every day they worked on a project. So for one day, employee, Joe, could have a PROJECT_COST $ 80 to 123 project, the next day, Joe might have $40 PROJECT_COST for the same project.

    Dimension table, PROJECT, contains details of the project.

    A new feature has been added to the software - several customers can now be charged to a PROJECT, where as before, that a single client has been charged.
    This fresh percentage collapse is in a new table - PROJECT_BRIDGE. PROJECT_BRIDGE has the project, CUSTOMER_ID, will BILL_PCT. BILL_PCT always add up to 1.

    Thus, the bridge table might look like...
    CUSTOMER_ID BILL_PCT PROJECT
    123 100.20
    123 200.30
    123 300.50
    456 400 1.00
    678 400 1.00

    Where to project 123, is a breakdown for multiple clients (. 20,.30.50.)

    Let's say in PROJECT_FACT, if you had to sum up all the PROJECT_COST for project = 123, you get $1000.


    Here are the steps I followed:

    -In the physical layer, PROJECT_FACT has a 1:M with PROJECT_BRIDGE and PROJECT_BRIDGE (a 1:M) PROJECT.
    PROJECT_FACT = > PROJECT_BRIDGE < = PROJECT

    -In the logical layer, PROJECT has a 1:M with PROJECT_FACT.
    PROJECT = > PROJECT_FACT

    -Logical fact table source is mapped to the bridge table, PROJECT_BRIDGE, so now he has several tables, it is mapped (PROJECT_FACT & PROJECT_BRIDGE). They are defined for an INTERNAL join.
    -J' created a measure of calculation, MULT_CUST_COST, using physical columns, which calculates the sum of the PROJECT_COST X the amount of the percentage in the bridge table. It looks like: $ (PROJECT_FACT. PROJECT_COST * PROJECT_BRIDGE. BILL_PCT)
    -J' put MULT_CUST_COST in the presentation layer.

    We still want the old PROJECT_COST autour until it happened gradually, it is therefore in the presentation layer as well.


    Well, I had a request with only project, MULT_CUST_COST (the new calculation) and PROJECT_COST (the original). I expect:

    PROJECT_COST MULT_CUST_COST PROJECT
    123. $1000 $1000

    I'm getting this for MULT_CUST_COST, however, for PROJECT_COST, it's triple the value (perhaps because there are quantities of 3 percent?)...

    PROJECT_COST MULT_CUST_COST PROJECT
    123 $1000 (correct) $3000 (incorrect, it's been tripled)

    If I had to watch the SQL, you should:
    SELECT SUM (PROJECT_COST),
    SUM (PROJECT_FACT. PROJECT_COST * PROJECT_BRIDGE. BILL_PCT),
    PROJECT
    Of...
    PROJECT GROUP


    PROJECT_COST used to work properly at a table of bridge of modeling.
    Any ideas on what I got wrong?

    Thank you!

    Hello

    Phew, what a long question!

    If I understand correctly, I think the problem is with your old measure of cost, or rather that combines with you a new one in the same request. If you think about it, your request as explained above will bring back 3 rows from the database, that's why your old measure of cost is multiplied. I think that if you took it out of the query, your bridge table would work properly for the only new measure?

    I would consider the migration of your historical data in the bridge table model so that you have one type of query. For historical data, each would have a single row in the bridge with a 1.0 BILL_PCT.

    Good luck

    Paul
    http://total-bi.com

  • Repetition of groups nested in a single table - model RTF

    Hi all

    I have a little problem with RTF models. I try to use 2 recurring groups within a single table, but everything I'm not get data for the fields of the outer loop, or still getting only one record of the loop internal.

    It is a model of report of cash requirements. My expandable outside group is G_VENDOR and internal is G_INVOICE. I'm at the stage where I pasted the table with the G_INVOICE details in another table (with the NAME of the SELLER in the first field). This has however a drawback - it is not to repeat the name of the seller if there is more than one G_INVOICE in G_VENDOR. I don't want tables repeated for each provider, one with all the data.

    I had SR Oracle open, but they seem not to be very useful, makes me think it is a bug and not fixed will never be. I know that the XML flatenning would be an option, but I don't want be to redevelop all alone I need template for reports.

    Someone has an idea?

    Concerning
    Piotr

    Hi Piotr,

    Ideally you would be that flatten, but if you are inside the loop of invoice you can still access the fields of the outer loop by changing the form field and by prefixing with... /.

    for example becomes

    Kind regards

    Robert

  • tables model moving in the edition of editible regions

    Hi there everyone,

    Have made a model. When you do not pages from the model and then by changing the editible regions, the tables are shifing and not return to place of origin, even when I click here and there to see if they will go back. Sometimes the paintings returned to the original location and other times they do not.

    Made sure when make editable regions as td and another table code is not included in the editible regions.

    What I'm asking is when make you a model, if the table code is not included in the editable regions, should orient themselves around tables?

    What do you think?

    All solutions?

    Thanks a lot to you all,.

    Hope

    You misunderstood, I use templates all the time, I do not use its tables too much more, but you seem to have a mistake here. You have completed your and started yourbut havea link and some css in there, which would cause problems.


    and there still



    I think the biggest problem seems to be that you have regions editable on the tables overlap.  I think that if you finished a table and the end of an editable region started your editable region and then started with a table charge, it must stay as you want, but since the tables is all interconnected, moving a line splitter or neck causes them all to move...

    The best solution, see if you can get out of the structure of the table and work with

    Tags

    Gary

  • Editable with table/model problem

    Hello
    I'm having a strange problem with my page, and being new dreamweaver I don't know what is happening.
    I created a template for my Web site and the template seems to work ok, but in my editable region, I get a huge space in my table. I can't find the source of this gap, I went through the code but nothing is jumping on me as bad. It was built in Dreamweaver CS3 V9.0 Build 3481.
    You can view the page at http://fcwp.org/betapage.htm and I'm pretty sure you'll see what I'm going to talk right now. All have a guess at this problem?
    -Leif

    After reviewing the code once again, I see what you're talking about. I started cleaning up the page and his work/research better now (although I broke my menus spry in the process). Thanks for the help!

  • Merge cells in the table (model RTF)

    Good, everyone! Is it possible to merge cells during execution of certain conditions?

    Edited by: user11367404 the 24.08.2009 06:10

    Look at this.

    http://winrichman.blogspot.com/search/label/row%20Spanning

  • Request to apply regexp_like for models specified in tables

    Hi all

    with table trap_store as (vb clob) and table the conf (patten varchar2 (20))

    Need to retrieve the records of trap_store where given in the column corresponding to table models conf vb.

    Currently intend to use regexp_like function IE. REGEXP_LIKE (VB, 'Start').

    In the query above, I hardcoded the model as 'Start '. But models are present in the various conf table. Each row in the trap_store table that is to say; each value column vb trap_store table must match with all models of conf table.

    How to apply all the models of table of the conf?

    Cartesian product?

    select * from
    trap_store, conf
    where
    regexp_like(vb,pattern)
    
  • create a business model when there is only a single source table

    Hello
    How to create a business model when there is only a single source table in the physical layer



    Concerning
    Swathi

    It is very well possible and feasible. His name as a single Table model. Good example is HIS domain system where we have just one physical source. No need to create aliases in physics. Just use the same table twice in the MDB with a single logical table as a model made... As for example the number of users (aggregated). Then apply normal complex participate MDB and present in the presentation layer.

    http://gerardnico.com/wiki/dat/OBIEE/single_table_model
    http://gerardnico.com/wiki/dat/OBIEE/sasystem

  • JTable with custom column model and model table does not display the table header

    Hello

    I create a JTable with a custom table model and a custom column template. However the table header is not displayed (Yes, it's in a get). I have narrowed the problem down in one compilable example:

    Thanks for your help.
    import javax.swing.*;
    import javax.swing.table.*;
    
    public class Test1 extends JFrame
    {
         public static void main(String args[])
         {
              JTable table;
              TableColumnModel colModel=createTestColumnModel();
              TestTableModel tableModel=new TestTableModel();
              Test1 frame=new Test1();
    
              table=new JTable(tableModel, colModel);
              frame.getContentPane().add(new JScrollPane(table));
    
              frame.setSize(200,200);
              frame.setVisible(true);
         }
    
         private static DefaultTableColumnModel createTestColumnModel()
         {
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
              columnModel.addColumn(new TableColumn(0));
    
              return columnModel;
         }
    
         static class TestTableModel extends AbstractTableModel
         {
              public int getColumnCount()
              {
                   return 1;
              }
    
              public Class<?> getColumnClass(int columnIndex)
              {
                   return String.class;
              }
    
              public String getColumnName(int column)
              {
                   return "col";
              }
    
              public int getRowCount()
              {
                   return 1;
              }
    
              public Object getValueAt(int row, int col)
              {
                   return "test";
              }
    
              public void setValueAt(Object aValue, int rowIndex, int columnIndex)
              {
              }
         }
    }
    Published by: 802416 on October 14, 2010 04:29
    added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue (java.lang.Object)
    When the TableColumn is created, the default headerValue is null
    So the header ends up rendered empty label (probably of size 0 if the JTable calculates its size of header based on the size of the default rendering tool).

    It worked:

         private static DefaultTableColumnModel createTestColumnModel()
         {
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
                    TableColumn col = new TableColumn(0);
                    col.setHeaderValue("Header Title");
              columnModel.addColumn(col);
                    return columnModel;
         }
    

    Published by: jduprez on October 14, 2010 14:09
    Beaten by a fraction of a second!

    Published by: jduprez on October 14, 2010 14:10
    OK, by a split of 17 minutes, specifically: o)

  • A target table is in charge of two different sources but the same columns, but a source is one database and another in a flat file.

    We all hope you are doing well.

    I have a business problem to implement in ODI 11 G. It's here. I'm trying to load a target table from two sources that have the same column names. But a source is to the file format and the other is in the Oracle database.

    That's what I think I'll create two mappings in the same interface by using the Union between the sources. But I don't know how the interface would connect to different logical architecture to connect to two different sources.

    Thank you

    SM

    You are on the right track, all in a single interface. Follow these steps

    (1) pull model of your data in the designer of the source file and your table model target to the target pane.

    (2) all relevant columns map

    (3) in the source designer to create a new dataset and choose as the UNION join type (this will create a separate tab in the source designer pane)

    (4) select the new dataset tab in the source designer pane and pull your source oracle table data model in the designer of the source. All columns that are relevant to the target card

    (5) make sure that your staging location is set to a relational technology i.e. in this case the target would be an ideal candidate because it is where the ODI will organize the data from source two files and oracle and perform the UNION before loading to the target

    If you want to watch some pretty screenshots showing the steps above, take a look at http://odiexperts.com/11g-oracle-data-integrator-part-611g-union-minus-intersect/

  • How do I get the table cells?

    It's my get code that any object in propagation.

    Int32 childCount = parent-> GetChildCount();

    for (int32 /IndexEnfant = 0; childIndex < childCount; /IndexEnfant ++)

    {

    InterfacePtr < IHierarchy > child (parent-> QueryChild (childIndex));

    ChildUIDRef = UIDRef: GetUIDRef (child);

    TextFrame table

    }

    How do I get the table cells?

    You can access the table using ITableModel and GridAddresscell.

    But to get to the ITableModel since ITextModel implies some complexity.

    Few things to understand:

    -L'interface that corresponds to the written document is ITextModel

    -The recommended method to iterate tables in a story done by ITextStoryThreadDictHier

    -Get the ITextStoryThreadDictHier on the history and the main thread as ITextStoryThreadDictHier::NextUID()

    -Now get ITextStoryThreadDict for UID and query for ITableModel. If you get ITableModel, then you have found the table.

    Once you have ITableModel you can get ITableCell as follows:

    ITableModel:QueryCellContentBoss(GridAddress); Give ITableCell

    You can refer to SnipperRunner (SnpManipulateTextModel).

    Download text template table model:

    InterfacePtr textModel (storyUIDRef, UseDefaultIID());

    InterfacePtr textStoryDictHier (textModel, UseDefaultIID());

    NextUID UID = sourceStory.GetUID (); / / Download the main thread dictionary

    Now loop the dicthier to iterate through all the threads dicts.

    InterfacePtr textStoryThreadDict (sourceStory.GetDataBase (), nextUID, UseDefaultIID());

    InterfacePtr tableModel (textStoryThreadDict, UseDefaultIID());

    If (tableModel) / / the storythreaddict represents a table

    {

    You are now in a table

    }

  • ODI - read CSV file and write to the Oracle table

    Hello world

    After 4 years, I started to work again with ODI, and I'm completely lost.

    I need help, I don't know what to use for each step, interfaces, variables, procedures...

    What I have to do is the following:

    (1) reading a CSV file-> I have the topologies and the model defined

    (2) assess whether there is a field of this CSV file in TABLE A-> who do not exist in the table is ignored (I tried with an interface joining the csv with the TABLE model a model and recording the result in a temporary data store)

    Evaluate 3) I need to update TABLE C and if not I need to INSERT if another field that CSV exists in TABLE B-> if there

    Could someone help me with what use?

    Thanks in advance

    Hi how are you?

    You must:

    Create an interface with the CSV template in the source and a RDBM table in the target (I'll assume you are using Oracle). Any type of filter or the transformation must be defined to be run in the stadium. (you must use a LKM for SQL file and add an IKM Sql control (it is best to trim them and insert the data when it cames to a file if you want after this process, you may have an incremental update to maintain history or something like that).)

    For validation, you will use a reference constraints in the model of the oracle table: (for this you need a CKM Oracle to check constraints)

    Then, you must select the table that you sponsor and in the column, you choose which column you will match.

    To article 3, you repeat the above process.

    And that's all. Pretty easy. If you do not have the two tables that you need to use your validation that you need to load before loading the CSV file you need valid.

    Hope this can help you

  • External table Oracle via the Tables API

    Hello world

    I did experiment with the Oracle NoSQL database recently and I became a bit stuck with the new API of Tables. I have so far successfully of the external tables on the data entered using storage techniques 'vanilla' KV and avro (using generic and specific links) scheme, but create API Tables seems to be another matter entirely.

    My question arises in the trainer interface, which has a KeyValueVersion and a KVStore. I can't translate a KeyValueVersion created with the API of Tables in a primary key for recovery (since I don't know what the key generated by the API actually looks like to!) or map it on an avro scheme. The problem seems to be that the Tables API writes data in some format that can be easily translated into a string or an integer (releases from external table lines due to unknown characters if I am trying to retrieve all the values in the database to see what it looks like to), and try to map it to an AVRO map results in the error message 'the data are not as AVRO'.

    Scenario:

    I created a very simple table in the administration tool KV, which consists of a column personId (integer) that is PK, firstName, lastName, emailAddr (all channels) and enter 5 rows with success. What I want to do is to create an external table called person that returns just those 5 values (and brand new I add to the table of course). This means that I have to first understand what the parentKey value must be defined in the .dat file and how to take this key and it becomes a primary key for the recovery of the line.

    Faithful old Google could not find information on how to do this (he was only a thread similar to this with the answer "we'll add it soon"), so I hope that someone here managed to do!

    Thank you

    Richard

    Hi Richard

    I understand the issue you are facing. In the current version (12.1.3.0.9) the external tables feature only works with records of K/V not with the Table model, however, in the next version (which us will very soon be GA) we will support integration of external tables with the data of Table model as well. Please make sure that you have signed up for the announcement of release so that we can inform you of the release. I apologize for the inconvenience, he did to you.

    Best

    Anuj

    Sign up for announcements of NoSQL database , so we can warn you versions futures and other updates from the product of NoSQL database

  • How to treat only selected tables?

    I am writing a transformation I only applied to certain tables in the model.  I found the "isSelected()' on the table object function, but appears not to do what I thought, he does.  If I selected a table in the user interface and apply my transformation, the table not treated.  Passage through the debugger shows that the isSelected() function returns false for all my paintings.

    Here is the code I use to test...

    tables = model.getTableSet () .toArray ();

    for (t = 0; t < tables.length; t ++) {}
    table = table [t];

    If (table.isSelected ()) {}
    table.setName ("Found_You");
    }
    }

    Is it possible for me to treat only the tables that are currently selected in the user interface?

    Thank you

    Eric

    Hi Eric,.

    Must be something like this

    importPackage(javax.swing);
    mainView = model.getMainView();
    
    selObjects = mainView.getSelectedObjects();
    
    for (var t = 0; t		   

Maybe you are looking for

  • System tab Backgorund color changes

    I want to imitate a look of tab (attached) standard windows. I use freetext as a header on a frame of embedded system located on a label system to logically group controls. However, depending on the height of the freetext, the background color of the

  • HP envy m6-1225dx is expandable RAM for this laptop?

    I bought this laptop a few days ago, but I was wondering if the laptop RAM was expandable to 16 GB?

  • Update optional delivery does not

    My final problem with Vista is a popup which made their appearance often: the optional update delivery does not work.  You may be victim of software counterfeiting.  A link took me to Microsoft URL to validate my copy of windows, which failed.  But I

  • iDrac7 does not after that some has no connections

    Our system has a few new servers R720 with Enterprise iDrac7. Today, I noticed that the iDrac7 IP does not respond (cannot ping, ssh, web GUI...) after three connections fail in the Web interface (I typed the wrong password). I had to unplug the powe

  • Disable Autorun for Windows Media Player

    Hi all I thought myself as a fairly sophisticated computer until I upgraded to windows 7 and the new version of Windows media player. I'm running WMP 12.0.7600.16667 I can't find out how to disable auto playback with the DVD of. It is very irritating