Create Non Integer Dimension Array Fail


#1

I used scidb-15.7.0.9267 CE and I want to execute non integer dimensions example in ‘doc/examples/non_integer_dimensions.ail’
But I can’t create array because of syntax error.

At first I can’t use EMPTY keyword and I guess it was deprecated. So, I erase it.

AFL% create empty array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=,5,0, Time(datetime)=,20,2];
UserQueryException in file: src/query/parser/Driver.cpp function: fail line: 148
Error id: scidb::SCIDB_SE_PARSER::SCIDB_LE_QUERY_PARSING_ERROR
Error description: Error during query parsing. Query parser failed with error ‘syntax error’.
create empty array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=,5,0, Time(datetime)=,20,2]
^^^^^^

But I still can’t create array, because there are more syntax errors.

AFL% create array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=,5,0, Time(datetime)=,20,2];
UserQueryException in file: src/query/parser/Driver.cpp function: fail line: 148
Error id: scidb::SCIDB_SE_PARSER::SCIDB_LE_QUERY_PARSING_ERROR
Error description: Error during query parsing. Query parser failed with error ‘syntax error’.
create array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=,5,0, Time(datetime)=,20,2]
^
AFL% create array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=0:,5,0, Time(datetime)=0:,20,2];
UserQueryException in file: src/query/parser/Driver.cpp function: fail line: 148
Error id: scidb::SCIDB_SE_PARSER::SCIDB_LE_QUERY_PARSING_ERROR
Error description: Error during query parsing. Query parser failed with error ‘syntax error’.
create array Stock_Prices <Price : double, Qty : int64> [Symbol(string)=0:,5,0, Time(datetime)=0:,20,2]

How can I fix it?

Below thing is part of the example documents.


Q1: How do I create an array that uses a non-integer dimension?

When you want to declare an array that uses a non-integer dimesnion, you
supply a type name as part of the array definition. For example, to create
an array to hold values in our timeseries example:

Hygiene:
iquery -aq “remove ( Stock_Prices )”

iquery -aq "
CREATE EMPTY ARRAY Stock_Prices
< Price : double, Qty : int64 > [ Symbol(string)=,5,0, Time(datetime)=,20,2 ]
"

Things to note about this example CREATE ARRAY …

One of the common features of Timeseries applications is that users
frequently want to load data onto the “end” of the array. Each day, new
trade data extends the array, and sometimes new Symbols enter the
market. Consequently this array is ‘unbounded’. But in general,
arrays with NIDs can be bounded. Second, the array declared here is
empty-able. Arrays with NIDs, in common with any SciDB array, can
contain empty cells.

The only way to load an array with non-integer dimensions is to use
the ‘redimension_store()’ operator (or the AQL - INSERT INTO Target
SELECT * FROM Source). For example:


#2

Sorry, It was deprecated at Release 13.12.
This would be correct way for using Non-integer dimension.


The index_lookup() and uniq() operators have been optimized, and have officially become part of SciDB. They may be used as a workaround of non-integer dimensions, which are no longer supported. Refer to viewtopic.php?f=18&t=11722 for details.