AQL returns an error, "Un-supported command format with token"

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

Synopsis:

When you refer to a name that starts with a number, the text parser in aql returns an error:

For example, the following command fails because the set name “3191_sindex” starts with a number:

aql> INSERT INTO test.3191_sindex (PK, hmac) VALUES (10, 'DMTESTUuErs/DHDD3bQyoUV+vWTW81BZ7QeDA=')
Un-supported command format with token - '.3191' 
Type " aql --help " from console or simply "help" from within the aql-prompt.

Cause:

The aql parser returns the error because it does not know how to parse names that begin with a number.

Workarounds:

Rename the Set:

The following example shows the renamed set:

aql> INSERT INTO test.sindex_3192 (PK, hmac) VALUES (10, 'DMTESTUuErs/DHDD3bQyoUV+vWTW81BZ7QeDA=')
OK, 1 record affected.

Surround the name with quotes:

The following example shows how you can use quotes to write sets that start with numbers:

aql> INSERT INTO test.'3191_sindex' (PK, hmac) VALUES (10, 'DMTESTUuErs/DHDD3bQyoUV+vWTW81BZ7QeDA=')
OK, 1 record affected.