This should be an easy answer. I probably need to read the manual more thoroughly, but …
I am looking for a function that will clone an array’s schema. More precisely, create an empty array with the schema of another existing array.
I have an (prime) array whose schema changes over time. I also need a temporary empty array that gets some incoming re-dimensioned stuff at some intervals (daily) and I need to match the schema of the temporary array to the prime array.
I could remove and create this array, but the creation requires the schema info that I get from the prime array.
If I manually do this, it works (remove, create array <>… and go on).
I tried “insert * into temp from prime where someImpossibleCondition” to create the empty temp. It seems to work in that temp is indeed empty and show(temp) reveals the correct schema.
So I read something into a 1D array and try to stick it into temp using select * into temp from the 1D.
The command I am using is “insert * into temp from the1Darray” Sometimes, but not always, I get
UserException in file: src/smgr/io/Storage.cpp function: newChunk line: 2172
Error id: scidb::SCIDB_SE_STORAGE::SCIDB_LE_CHUNK_OUT_OF_BOUNDARIES
Error description: Storage error. Chunk is outside of array boundaries.
Failed query id: 1102445806031
If I manually remove(temp) and “create temp …” with the schema I read from prime with show() and retype, all is well.
What am I doing wrong?
BTW: prime can get to be very big and it keeps growing as things get added to it. An insert function would to the trick, but until that’s available, I am trying the merger method suggested by Alex in another posting.
Thanks and Cheers, George