Skip to content
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

【Request】OPENJSON() & JSON_QUERY() #340

Closed
hiroyuki0415 opened this issue Aug 24, 2023 · 1 comment
Closed

【Request】OPENJSON() & JSON_QUERY() #340

hiroyuki0415 opened this issue Aug 24, 2023 · 1 comment

Comments

@hiroyuki0415
Copy link

hiroyuki0415 commented Aug 24, 2023

Could you please add the following implementation ?

OPENJSON

  • I want to apply CROSS APPLY to the return value. like :
-- cloudflow : parameters = 1 : N
SELECT w.name,
       trigger_param.*
FROM   workflow AS w 
       CROSS APPLY OPENJSON(JSON_QUERY(w.clientdata, 'properties.definition.triggers.manual.inputs.schema.properties')) AS trigger_params
WHERE  w.category = 5;
Click me

JSON_QUERY(w.clientdata, 'properties.definition.triggers.manual.inputs.schema.properties') is like:

{
    "text": {
        "title": "param1",
        "type": "string",
        "x-ms-dynamically-added": true,
        "description": "desc1",
        "x-ms-content-hint": "TEXT"
    },
    "text_2": {
        "title": "param2",
        "type": "string",
        "x-ms-dynamically-added": true,
        "description": "desc2",
        "x-ms-content-hint": "TEXT"
    },
    "number": {
        "title": "param3",
        "type": "number",
        "x-ms-dynamically-added": true,
        "description": "desc3",
        "x-ms-content-hint": "NUMBER"
    }
}

JSON_QUERY

  • I know there is already a function JSON_VALUE(). I want a function that accepts arrays and objects as return values

Thanks in advance for your support.

P.S.
I'm always indebted to this plugin of yours.

@MarkMpn
Copy link
Owner

MarkMpn commented Nov 25, 2023

This is covered by #383 and will be in the next release.

@MarkMpn MarkMpn closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants