Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Grouper Loader

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Grouper Loader


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Klug, Lawrence" <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: Grouper Loader
  • Date: Mon, 23 Jan 2012 20:15:09 +0000
  • Accept-language: en-US

Good news, thanks.  You might be able to use the obliterate method to clean things up (if your grouper is up to date) J

 

https://bugs.internet2.edu/jira/browse/GRP-684

 

Also, if you are using views, you can set the where clause to only load a fraction of the data so you can do a sanity check J

 

Chris

 

From: Klug, Lawrence [mailto:]
Sent: Monday, January 23, 2012 2:57 PM
To: Chris Hyzer
Cc:
Subject: RE: Grouper Loader

 

Chris,

 

I just did my first test run with the loader against our data warehouse.  It took a while to get granted access to the tables I needed.  The result:  orgs were loaded – albeit not into the stem that I wanted.  They went under the root stem.  Not bad for a first run!

 

Thanks,

 

Lawrence

 

From: Chris Hyzer [mailto:]
Sent: Tuesday, December 20, 2011 12:35 AM
To: Klug, Lawrence
Cc:
Subject: RE: Grouper Loader

 

Ok, you are in good shape since all the parent and ancestor relationships are in the table.

 

You need a bunch of views, one for each level of hierarchy (or if you are a SQL expert maybe you can do it in a fewer number of views).  You don’t need to worry about the org management section of the grouper.properties since your hierarchy is in each row already.

 

1.       Person departments

 

Grouper loader query

select dept_person.person_id as subject_id, 'ucla_person_source' as SUBJECT_SOURCE_ID,

  'orgs:org_' || d.org_code || ':div_' || d.division_code || ':subdiv_' || d.sub_division_code || ':dept_' || dept_code as group_name

  from department d, department_person dept_person where d.dept_code = dept_person.dept_code

 

Grouper loader groups query (add more cols if you want privileges, include/exclude, etc

select

  'orgs:org_' || d.org_code || ':div_' || d.division_code || ':subdiv_' || d.sub_division_code || ':dept_' || dept_code as group_name,

  'Orgs:Org ' || d.org_title || ':Div ' || d.division_title || ':Subdiv ' || d.sub_division_title || ':Dept ' || dept_code as group_display_name

  from department d

 

2.       Subdivision rollups

 

Grouper loader query

select department_groups.id as subject_id, 'g:gsa' as SUBJECT_SOURCE_ID,

  'orgs:org_' || d.org_code || ':div_' || d.division_code || ':subdiv_' || d.sub_division_code || '_rollup' as group_name

  from department subdivision, department d, grouper_groups department_groups where

  subdivision.sub_division_code = d.sub_division_code

  and department_groups.name = 'orgs:org_' || d.org_code || ':div_' || d.division_code || ':subdiv_' || d.sub_division_code || ':dept_' || dept_code

 

   

 

Grouper loader groups query (add more cols if you want privileges, include/exclude, etc)

select

  'orgs:org_' || d.org_code || ':div_' || d.division_code || ':subdiv_' || d.sub_division_code || '_rollup' as group_name,

  'Orgs:Org ' || d.org_title || ':Div ' || d.division_title || ':Subdiv ' || d.sub_division_title || ' Rollup' as group_display_name

  from department d

3.       Etc for division and org.  Note, you are just adding the departments to the subdivisions, and you can add the subdivion rollups to the divisions, etc.

 

For each of these sets of queries, you would have one loader job.  If you need more info about it let me know J

 

Thanks,

Chris

 

From: Klug, Lawrence
Sent: Monday, December 19, 2011 12:02 PM
To: Chris Hyzer
Cc:
Subject: RE: Grouper Loader

 

Chris,

 

The hierarchical orgs  demo went well.  Now I want to see if I can apply it to our organization.   We have four levels of hierarchy her at UCLA:  Org: Division: Sub-Division: Department. I’m guessing that the first three levels will be stems and departments will be the groups.  Each of the four have ID and title columns in a de-normalized “departments” table.  In order to pull in the assignments, we will join to an employee table using  department ID as foreign key.  What configuration changes are necessary to make this  work?

 

Thanks,

 

Lawrence

 

From: Chris Hyzer
Sent: Tuesday, December 13, 2011 11:04 AM
To: Klug, Lawrence
Cc:
Subject: RE: Grouper Loader

 

Try setting this in the grouper-loader.properties and restart (GSH, something, whatever):

 

# auto-add grouper loader types and attributes when grouper starts up if they are not there

loader.autoadd.typesAttributes = true

 

chris

 

From: Klug, Lawrence
Sent: Tuesday, December 13, 2011 1:59 PM
To: Chris Hyzer
Cc:
Subject: RE: Grouper Loader

 

Chris,

 

I’ve been working through this exercise.  When I create the orgsConfig group, I’m not seeing the “grouperLoader”  option for “Select Group Types”

 

Thanks,

 

Lawrence

 

 

 

From: Chris Hyzer
Sent: Thursday, December 08, 2011 11:37 AM
To: Klug, Lawrence
Cc:
Subject: RE: Grouper Loader

 

Ok, yes, I think it is appropriate, and we do this at Penn J

 

Here is the doc on hierarchies with Grouper loader, and I added a lot of info about how we do this at Penn as an example:

 

https://spaces.internet2.edu/display/Grouper/Organization+hierarchies+via+the+grouper+loader

 

Let me know how it goes J

 

Thanks,

Chris

 

 

From: Klug, Lawrence
Sent: Thursday, December 08, 2011 12:02 PM
To: Chris Hyzer
Subject: RE: Grouper Loader

 

Hi Chris,

 

Here is the use case:  We have a payroll system at the University that contains an hierarchical structure ( organization, division, sub- division, department ).  We want to feed this data into grouper automatically creating the groups analogous to the structure in the payroll database.  There would be an initial large import, followed by periodic updates as the database changes.   Would Grouper Loader be the appropriate tool?

 

Thanks,

 

Lawrence

 

From: Chris Hyzer
Sent: Wednesday, December 07, 2011 4:19 PM
To: Klug, Lawrence;
Subject: RE: Grouper Loader

 

The loader will load memberships into a group or list of groups based on a query (and you can have multiple grouper loader jobs).

 

Steps are: make the query, make a group and assign the grouperLoader type, set the attributes.

 

Let me know if you are loading 1 group or a list of groups from one query, and I can give more specifics.  The hard part is writing the query though, the rest should be easy J

 

Thanks,

Chris

 

From: On Behalf Of Klug, Lawrence
Sent: Wednesday, December 07, 2011 6:05 PM
To:
Subject: [grouper-users] Grouper Loader

 

Question:

 

Let’s say I want to configure Grouper Loader to feed Subjects and Groups into the Grouper Repository from an SQL database.  What high-level steps are required?  How do I know which  columns to provide to Grouper when writing the SQL query?

 

Thanks,

 

Lawrence




Archive powered by MHonArc 2.6.16.

Top of Page