Sometimes, all you have, is access to DA no other tool, and want to run some queries it can be very painful.
There is no way to execute multiple DQLs through DA unlike API commands.
Were you ever stuck in such a situation, well, don't waste your time trying. Just frame your DQLs to do the job, convert your DQL to API commands.
Step1: Frame the DQL:
Let me give two examples as the APIs for them will correspondingly change.
1. CREATE dm_group object SET group_name = 'abc'
2. UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'
If we had to run the above two queries on DA, we would have to run each one at a time. By converting these DQLs into APIs, it is possible to run them in one go. here is what we do:
Step2: Convert DQL to API
Just prefix the DQLs with the following API commands accordingly:
execquery,c,0 [or] execquery,c,F
execquery,c,1 [or] execquery,c,T
Hence our DQLs will look like this:
1. execquery,c,1,CREATE dm_group object SET group_name = 'abc'
2. execquery,c,0,UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'
NOTE: The parameter "1" or "T" in the API command signifies that the action being performed will create a new instance of an object in the repository, so all CREATE DQLs when converted to APIs. For all other Select or UPDATE operations the Parameter value "0" or "F" should be used.
Once the APIs are ready, you can run them in the API editor by choosing the "Script (multi-line) Entry" in the editor which allows execution of multiple API commands.
There is no way to execute multiple DQLs through DA unlike API commands.
Were you ever stuck in such a situation, well, don't waste your time trying. Just frame your DQLs to do the job, convert your DQL to API commands.
Step1: Frame the DQL:
Let me give two examples as the APIs for them will correspondingly change.
1. CREATE dm_group object SET group_name = 'abc'
2. UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'
If we had to run the above two queries on DA, we would have to run each one at a time. By converting these DQLs into APIs, it is possible to run them in one go. here is what we do:
Step2: Convert DQL to API
Just prefix the DQLs with the following API commands accordingly:
execquery,c,0 [or] execquery,c,F
execquery,c,1 [or] execquery,c,T
Hence our DQLs will look like this:
1. execquery,c,1,CREATE dm_group object SET group_name = 'abc'
2. execquery,c,0,UPDATE dm_group object SET description = 'abc group' WHERE group_name = 'abc'
NOTE: The parameter "1" or "T" in the API command signifies that the action being performed will create a new instance of an object in the repository, so all CREATE DQLs when converted to APIs. For all other Select or UPDATE operations the Parameter value "0" or "F" should be used.
Once the APIs are ready, you can run them in the API editor by choosing the "Script (multi-line) Entry" in the editor which allows execution of multiple API commands.
No comments:
Post a Comment