on ‎2021 Feb 17 4:44 PM
Hello Folks,
I am trying to write a dynamic SQL query in SAP Data Intelligence.
My requirement is to fetch 1000 records from Hana staging table and expose it to web, where user can edit the data. This data would be updated back in staging table. Once user clicks next then next 1000 records would be displayed on the web page exposed by API call.
I could filter the records based on limit and offset using the 'Run Hana SQL' operator but that is a static configuration.
Could anybody suggest on how to create the dynamic SQL query to provide limit and offset as parameters?
Thanks.
Indu Khurana.
Request clarification before answering.
Hello Indu,
You can use parameters in SAP HANA SQL:
select 'architectSAP' from dummy limit ${limit} offset ${offset}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You Frank for your response.It is really helpful.
I tried it in two ways , one through constant generator and other by passing the query in java script and it works.
Just a small question, can we alter a table to add primary key in the same pipeline in which we are creating the table through table producer. I tried it but it fails with error that the table does not exist.
As the number of columns are 200, I did not use HANA client operator.
Hence I kept the alter table in another graph and now I am trying to connect two graphs.
Is there a way to set primary key on HANA table without using static schema?
Also, how do we call graphs from one graph?
Regards,
Indu Khurana.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.