SQL text has exceeded 10000 lines of code

Hello!
I’m using Openlink Virtuoso (Dockerized) Version: 07.20.3236 on a Ubuntu 22.04 operative system.

I have a very big R2RML script, with a lot of rr:joinCondition and rr:sqlQuery (with join inside SQL) and when I try to create a virtual graph from iSQL, it returns this error:

SQLState: 37000

Message: SQ074: Line 1189: SP031: SPARQL: Internal error: The length of generated SQL text has exceeded 10000 lines of code

I tried splitting the R2RML into two files and simplifying the rr:sqlQuery but it didn’t fix anything.

Is there a solution to the problem?

PS: The whole R2RML script is working (I tried running it in small chunks cleaning up the graph from time to time).

The 10000 lines of code is an internal limit on the length of generated SQL text in Virtuoso, thus the R2RML script would have to be split to enable creation. If more details on what has been tried so for to try and split or and example of script resulting in occurrence of the error we can provide guidance on how it might be split to enable creation ?

Thank you @hwilliams,
the problem is solved!

I splitted the R2RML and put the mapping in two different QMs,
Before:

INSERT { GRAPH <urn:geca:tables:r2rml:mappings>{....};
EXEC ('SPARQL ' || DB.DBA.R2RML_MAKE_QM_FROM_G ('urn:geca:tables:r2rml:mappings'));

After:

file1:
INSERT { GRAPH <urn:geca:tables:r2rml:mappingspart1>{ .... };
EXEC ('SPARQL ' || DB.DBA.R2RML_MAKE_QM_FROM_G ('urn:geca:tables:r2rml:mappingspart1'));
file2:
INSERT { GRAPH <urn:geca:tables:r2rml:mappingspart2>{ .... };
EXEC ('SPARQL ' || DB.DBA.R2RML_MAKE_QM_FROM_G ('urn:geca:tables:r2rml:mappingspart2'));