11-02-2010 03:06 PM
Hello,
I have a lot of data to write to a database. The data types are not all equel. I have to make a cluster with all the elements in. The first 10 elements are of a different type than the other 1001 variables.
When I create from the first 10 variables a cluster and a cluster of the other 1001 and combine them I get an array of clusters, but I need one cluster with all elements inserted.
How to solve this.
I attachted a vi for example (In the VI the array of clusters is shown, but how to create one cluster with elements).
best regards,
Rens
11-02-2010 03:25 PM
You do not have an array of clusters. The Array to Cluster primitive defaults to 9 elements. If you want a different number you must change it manually. Context-click on the primitive and select Cluster size...
Might it not be better to do two writes to the database? One with the small cluster and the other with the array of data?
Lynn
11-03-2010 04:28 PM
Thank you for your answer. I experienced the cluster size you mentioned. When I have to put all parameters to 1 clusters I have to create a cluster of 10+1001 elements. Any options/solutions to create such a cluster?
The other option you wrote might be a solution as wel.
It might be a solution to write in two steps, but can you explain how this is working? When I send only the first part, I receive an error that the other 1000 values has to be filled in (because I selected them as not equal to zero). How can I write to a predefined row and column set?
Rens
11-04-2010 07:29 AM
I tried to make a cluster of 1001 elements and it did not work. So I checked the help and found that the Array to Cluster conversion primitive is limited to a maximum of 256 elements. To use this method would require splitting the array into 4 parts and converting each of them to a separate cluster. Now you have 4 or 5 clusters.
I have not worked with writing data to databases, but I suspect that a better way than large clusters exists to write arrays of data. What if you had an indefinite number of data points rather than 1001? Check your database documentation or ask the Forum about how to write arrays to a database.
Lynn