attribute with attribute_rename

See this error:

AQL% SELECT * INTO fooScaled FROM attribute_rename(fooScaled,valueS,value);
UserQueryException in file: src/query/OperatorLibrary.cpp function: createLogicalOperator line: 86
Error id: scidb::SCIDB_SE_QPROC::SCIDB_LE_LOGICAL_OP_DOESNT_EXIST
Error description: Query processor error. SystemException in file: src/query/OperatorLibrary.cpp function: createLogicalOperator line: 86
Error id: scidb::SCIDB_SE_QPROC::SCIDB_LE_LOGICAL_OP_DOESNT_EXIST
Error description: Query processor error. Logical operator ‘attribute_rename’ does not exist…
SELECT * INTO fooScaled FROM attribute_rename(fooScaled,valueS,value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Why it does not exist?

Hi @dogiaokhanhlinh1,
attribute_rename isn’t a valid operator in SciDB. You can rename attributes in an array by combining project and apply. Consider an array ARR with attributes a, b, c. You can rename those attributes to something else (e.g., x, y, z) by doing the following:
store(project(apply(ARR, x, a, y, b, z, c), x, y, z), ARR2);
The new array ARR2 will contain attributes x, y, z with the same values and positions as a, b, c, in ARR.
Dave