Failure to execute cql script using cqlsh with nested SOURCE on DSE 5.1.2

415 Views Asked by At

I have a script I used to execute queries and DDL in DSE 4.8.10.

The script include nested use of the SOURCE command. E.g.
1.sql

USE test;
SOURCE '2.sql'
exit;

2.sql

SELECT count(1) FROM user;
SOURCE '3.sql';

3.sql

SELECT count(1) FROM user;

When executing this script with DSE 4.8.10 it runs correctly and output

cqlsh –f  1.sql
count
--------
 0

(1 rows)

count
--------
 0

(1 rows)

Running the same script in DSE 5.1.2.

cqlsh –f  1.sql
 count
-------
     0

(1 rows)

Warnings :
Aggregation query used without partition key

2.sql:3:DSEShell instance has no attribute 'execution_profiles'

The actual issue is that the script in 3.sql is not executed.
I failed to find any useful information on the error "DSEShell instance has no attribute 'execution_profiles'"

I failed to figure out what are execution_profiles although they are mentioned int the python docs here

Note: I am using python 2.7.7

Update I did some additional investigations

  1. With DSE-5.1.2 I switch the off to authenticator: AllowAllAuthenticator authorizer: AllowAllAuthorizer, but I am still experiencing the issue

  2. With DSE-5.1.1 it also happens

  3. With DSE-5.0.9 it works

  4. I failed to reproduce this in Apache Cassandra 3.11.0

Update 2: following support ticket we posted for Datastaxs we got a patch for this issue, I guess we should be expecting this to be fixed in the near feature.

1

There are 1 best solutions below

0
On

As from DSE 5.1.4 this issue was resolved as part of DSP-14494.

See the 5.1.4 release notes

DSP-14494:Always define execution_profiles in cqlsh.py.
I tested this with 5.1.4 and the issue was resolved.