Does user search query support OR clause for Orgunits? - google-admin-sdk

I'm trying to use the google directory api to get a specific set of users based on their orgUnitPath. I can't seem to get a query working where I do something like orgUnitPath=/OUTest OR orgUnitPath=/LeftOU without having to make two separate api calls. Any advice.

The query does not support OR. Currently two API calls will be necessary.

Related

WSO2is SCIM query with two filters

I understand that it is not possible to use the 'or' operator to make queries.
What alternative is there to perform a query with two filters for same attribute but diffrente query, for example:
scim2/Users?filter=field+sw+content-a&filter=field+sw+content-b
This Git issue is still in open state. Therefore, believe this has not yet been implemented.
You can achieve your requirement using 2 SCIM calls(One for each filter). Then programatically get the union of the results. Same goes for NOT operator as well. You have to perform multiple SCIM calls and programtically obtain the end result.

Connecting Reports to Web APIs with Parameters

I have a client that has a large number of customers, and I have reports that can accept parameters and pass to a REST-based Web API to pull, for example, customer-specific records. This, of course, is easy using Power BI.
The challenge is, there could literally be 500,000 records out there, so filters and passing filters is not really an option. What I need to do is pass a value via Power BI Embedded to the report that will update the parameter of the Web API dynamically.
Such as https://services.server.com/api/customers/{customerId}
.
I have read and experimented with about every technique possible, and yet I still can't seem to pull this simple (and common) scenario off. To confirm, this is would work fine if I allowed a user to filter these values manually, but the goal is to have the Web.Content value be dynamic (like via a parameter) and then the parameter (like CustomerId) get fed to the report externally, like in a Power BI embedded parameter to the report.
Again, this can't be a filter, I just want to do what you used to be able to do with SSRS or Crystal Reports and send something like {parameter} = (or eq) '{some value}' and have the report use that as the datasource JSON feed.
Any thoughts on this frustrating situation?
You can do this with RLS:
https://learn.microsoft.com/en-us/power-bi/developer/embedded-row-level-security
Bring all the 500,000 records to your pbix.
Define a role which will filter based on an username.
When embedding, pass the role and the desired username to the embed token.

How to move the data from one DynamoDB table to other DynamoDB table in the same region on click of HTML button

I am very new to AWS. As the first step I am creating an eCommerce application on my personal interest to give the demo of this application to my colleagues.
I am implementing 'Order' part. For this, I am thinking of moving the data from one table to other. I.e Once the user add the product to cart , it will saved in Cart table in dynamo-db and in cart screen when the user clicks on 'Order'button/Link, the same data as it is in cart table should be moved to Order table and the cart should be empty So, the order can be confirmed.
How could I implement it? Not sure the method I am thinking is right if there any other method to accomplish Order functionality.
The answer to this is really going to depend on your architecture and stack - and even within that you have lots of options.
In a serverless way, i.e. from a static html page with no server-side backend, you could create a lambda function in the supported language of your choice and with the proper IAM role, to move the data from one table to the other - your html page could call it via an API call, and I would suggest you use AWS API Gateway to expose an api endpoint that then calls the lambda function.
If on (one of the other many) other-hands, say you were using ASP.net or PHP on the server side, you could use the AWSSDK to talk to the dynamodb directly and accomplish the same thing.
Besides these two options there are many, many alternatives and variations - and with all of the options you are also going to need to deal with authentication/security to make sure no one can make calls to your database/service that they aren't permitted to - perhaps not important for your demo application, but will definitely be an issue if/when you go live.

FQL: group results that have a field in common

I'm developing an application based on the facebook checkins.
I'm searching a way to group the results, that I receive asking for an user's checkins, by the page_id with a single FQL query.
Generally I would try with the GROUP clause of the SQL language but i read that this clause isn't supported by FQL.
Thanks in advance,
Luca
Since there is no GROUP BY available, as you said, this is not possible via a single FQL query.
Your options are to either do that yourself while processing the data you received by looping over it and transfering it into the desired data structure, or if you know what pages are involved beforehand, by doing a multi query including one single query for every page_id.

C++: Converting the resultset of a SQL query into JSON

Is there a standard way/well known method to convert the results of a SQL query, using the MySQL client library, or otherwise into JSON so I can directly pass the results to a JS script?
Before the obvious, no, I'm not allowing SQL queries directly from the browser, I'm implementing a specific subset of SQL in a simple API to expose to clients who will be retrieving the results using AJAX, I figured JSON is the best encoding, just wanted to check and see if there was already a well known way of doing this before I wrote my own.
Thanks!
You may take a look at:
http://weblogs.asp.net/thiagosantos/archive/2008/11/17/get-json-from-sql-server.aspx
It provides a recipe to get JSon from SQL.
My the way, I assume that it is MS SQL as you don't specify.
Good Luck