just-bi / odxl

Open Data Export Layer
Apache License 2.0
13 stars 7 forks source link

Passing Input parameters of HANA to odxl #40

Closed joel-myworld closed 6 years ago

joel-myworld commented 6 years ago

I've been trying to download data from a calculation view to xlsx format. But no matter what I do, I cannot pass the input parameters of the calculation view to ODXL.

Can we have support for this in the future?

Keep up the good work! Cheers, Joel

rpbouman commented 6 years ago

Joel, sounds like a great feature!

In the interest of delivering something quickly, that is not too hard to implement, I suggest we add a $parameters query option which we use to pass them. Sounds good?

rpbouman commented 6 years ago

@joel-myworld actually, upon inspection, it seems the feature is already there.

If I create a very simple view on DUMMY with one parameter IP_TEST, and then select that paramter in a calculated column, I can do:

http://hanahost:hanaport/system-local/public/rbouman/odxl/service/odxl.xsjs/%22_SYS_BIC%22/%22system-local.public.rbouman.hxmla.models/CA_DUMM_PARAMETERS_GRA_001%22(IP_TEST='bla')?$format=sql

And this is the SQL that is generated:

SELECT * FROM "_SYS_BIC"."system-local.public.rbouman.hxmla.models/CA_DUMM_PARAMETERS_GRA_001"('PLACEHOLDER' = ('$$IP_TEST$$', 'bla'))

It executes too, and gives me the expected result.

So, since the functionality is already there, we should probably keep it that way.

The question now is,

joel-myworld commented 6 years ago

@rpbouman I did try something similar. but I didn't have the syntax right. Now I get the SQL query as you mentioned above.

rpbouman commented 6 years ago

@joel-myworld Is your issue solved? Can I close this issue?

joel-myworld commented 6 years ago

Yes. Thank you.