-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic params from udf with OAuth integration? #329
Comments
Not sure I understand the question, but allow me to clarify how UDFs work. The purpose if udf is to allow a patch to manufacture params using some inputs from selects. Here is an example.
Let's say, bar returns the min of 2 and 3. Then the params will hold
Please see https://github.com/ql-io/ql.io/blob/master/modules/engine/test/patch/udf.[js|ql] for an example. The params computed should be available for OAuth work. |
I think that this is exactly what im doing or? But in the OAuth patch headers var uri = uriTemplate.parse(options.statement.uri).format(options.params); doesn't contain this parameter... |
Thanks. Checking ... |
Here is the example I just tried.
Given a statement
this prints
on the console. Can you try with the latest from npm? |
I added a test to verify that this is working. |
But this only works if "p1" or "p2" is not a query parameter defined in the create table statement. If you define it as a parameter like the testValue above then the params are undefined. How could i define that "p1" should be used as the "testvalue" above? |
I see it. Working on a fix. Sorry for hastily closing. |
#385 has the fix. |
Pushed to npm. ql.io-engine-0.4.23 has the fix. |
Add test for ql-io#329
How is it possible to use udf functions in statement which are considered in the OAuth Part.
On my example below the request uses the udf parameter, but the OAuth uri doesn't know the parameter from the udf.
Any ideas?
im using the following select statement
the create table statement:
and patch:
The text was updated successfully, but these errors were encountered: