Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] creating empty groups from an SQL source

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] creating empty groups from an SQL source


Chronological Thread 
  • From: Jeff McCullough <>
  • To: Shilen Patel <>
  • Cc: Gouper Users List <>
  • Subject: Re: [grouper-users] creating empty groups from an SQL source
  • Date: Mon, 10 Oct 2016 11:39:35 -0700
  • Ironport-phdr: 9a23:hqOilxS7sR4E/C/zidl2b7CW/Npsv+yvbD5Q0YIujvd0So/mwa67bRKN2/xhgRfzUJnB7Loc0qyN7PCmBDdLuMvJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3XfDB4LeXtG4PUk9//l6Xro8WSME10g2+GYbJ2IRP+lQzNu81e1ZBiK6I8zDPFv3hFPela2DU7C0iUmkPe68m+tLto2DlUv/U8+M4IBaf3cao9RpRSAS4lPmQ49YvmuQSVHljH3WcVTmhDykkAOAPC9hyvG86p6iY=

I had thought that might be possible, but tried moving the select from grouperLoaderQuery to grouperLoaderGroupQuery. 


I get this error:

// Error: unable to evaluate command: Sourced file: inline evaluation of: ``loaderRunOneJob(group);'' : Error invoking compiled command: : Error in compiled command: java.lang.RuntimeException: java.lang.RuntimeException: Invalid query, must start with select:  order by group_name

java.lang.RuntimeException: Invalid query, must start with select:  order by group_name
        at edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderResultset.<init>(GrouperLoaderResultset.java:404)

-------
if (!query.toLowerCase().trim().startsWith("select")) {
throw new RuntimeException("Invalid query, must start with select: " + query);
}
———

I realized after a bit that what it means is that there isn’t a select statement in grouperLoaderQuery. As I read further, the grouperLoaderGroupQuery appeared to be an additional query that was only used as a way to add more descriptive information as well as permissions to the group. Given that, I went back to trying to find a way to load the empty groups independently of the grouperLoaderGroupQuery. If grouperLoaderGroupQuery is the way to do it, then I’m still missing what select statement needs to go in the grouperLoaderQuery?

Thank you,
Jeff

On Oct 10, 2016, at 5:07 AM, Shilen Patel <> wrote:

You should be able to do it by specifying a grouperLoaderGroupQuery that contains all the groups.


Thanks!

- Shilen

On 10/9/16, 11:59 PM, "Jeff McCullough" <> wrote:

I’ve been playing around with SQL_SIMPLE and GROUP_LIST for grouper loader connections. I’d like to create a list of title code groups that are empty to start, and then some are populated with current accounts. The empty to start part is necessary for creating title code groups for various jobs on campus. Some of the title codes are not currently being used, but they may in the future. We want to create title code based nested groups for various job types. We are hoping to hand this off to the HR group, since they are the authorities as title code groupings may change over time. They will want to add all the nested title code groups at once rather than having to worry about adding them later when someone new is using a previously unused title code.

I can’t see a easy way to directly create them besides using SQL_GROUP_LIST and using a select statement like:

select ‘0’ as subject_id, group_name, etc…

against a view that has a list of all possible title codes. The ‘0’ is unresolved, but it does create an empty group. Is there another way to do this? I haven’t seen it in the documentation, though there are discussions about creating org trees and class lists of nested groups. Maybe I’m missing the obvious. Who knows.

Thanks,
Jeff




Archive powered by MHonArc 2.6.19.

Top of Page