Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Query question answers 1 &2

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Query question answers 1 &2


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Alan Rothenbush <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: Query question answers 1 &2
  • Date: Sun, 29 Nov 2015 16:36:18 +0000
  • Accept-language: en-US

You shouldn’t insert into the database. Please use GSH, perhaps generated
from SQL. Let me know if you need help.

Example:

https://spaces.internet2.edu/pages/viewpage.action?pageId=14517859#GrouperShell(gsh)-CreateascriptfromSQL


Thanks,
Chris



-----Original Message-----
From: Alan Rothenbush
[mailto:]

Sent: Friday, November 27, 2015 11:51 AM
To: Chris Hyzer
Subject: Re: Query question answers 1 &2

Many thanks for all the help!

I was eventually able to figure it out, by reverse engineering the schema.
The SELECT needed (quite) a few JOINS, but it gave me the answer.

Sadly, it told me what I didn't want to know, that something has "broken"
along the way.


In short, we've added a custom attribute, and the GROUPERLOADER sets that
attribute when reading its input source.

And for years, it did exactly that, correctly setting an attribute to a "1"
when required.

But my query above shows that it stopped doing this somewhere along the line.
(Not sure when.) So I have 2,000 groups with the attribute set properly and
another 1,200 where it SHOULD be set, but is NOT set.

OK, well, we know which groups need setting, so do a SQL UPDATE to get us
back in sync; done.

Only I can't do an UPDATE because if the attribute is not set, Grouper does
not create a row! (To economize on space maybe?)

So, with no row in the table to UPDATE, I need to do an INSERT before I can
do an UPDATE.

But an INSERT requires me to create a GUID, only I'm not sure of the Grouper
logic to generate GUIDs, so I now have another puzzle.


The funny thing is, if I use the GUI, I can set the attribute manually and
the row appears with the attribute set. Remove the attribute (GUI field
blank) and the row is removed.

MAYBE I can figure out from the code how the attribute row is created in the
GUI. There sure is a lot of code to look through though ...

<g>


Anyway, thanks again for all your assistance and your patience.



Alan


----- Original Message -----
> From: "Chris Hyzer"
> <>
> To: "Alan Rothenbush"
> <>
> Sent: Sunday, November 22, 2015 5:20:09 PM
> Subject: RE: Query question answers 1 &2
>
> Look in: grouper_groups_types_v
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: Alan Rothenbush
> [mailto:]
> Sent: Friday, November 20, 2015 1:54 PM
> To: Chris Hyzer
> Subject: Re: Query question answers 1 &2
>
> Sadly, that view contains no data.
>
> Grouper is version 2.1.3, and given my limited knowledge and the mission
> critical nature of this otherwise running just fine service, I'm reluctant
> to update.
>
>
> Alan
>
>
>
> ----- Original Message -----
> > From: "Chris Hyzer"
> > <>
> > To: "Alan Rothenbush"
> > <>
> > Cc:
> >
> > Sent: Friday, November 20, 2015 9:28:51 AM
> > Subject: RE: Query question answers 1 &2
> >
> > If its not there remind me what version of grouper you have
> >
> > -----Original Message-----
> > From: Alan Rothenbush
> > [mailto:]
> > Sent: Friday, November 20, 2015 11:08 AM
> > To: Chris Hyzer
> > Subject: Re: Query question answers 1 &2
> >
> > 1. SQL is my preferred option, as the retrieved data will be processed by
> > a
> > shell script, shell scripts and SQL being familiar to me.
> >
> > I'm actually a management type, who used to do real work way back when,
> > but
> > with the departure of both of our Grouper people, the latest quite
> > suddenly
> > and unexpectedly, I'm now pressed into actually working again.
> >
> > Mostly, that means maintaining a well running instance, but there is at
> > least
> > one little .. annoyance .. to be fixed.
> >
> > 2. I'm looking for all groups with the attribute set, The PCode would
> > look
> > like
> >
> > SELECT * from 'grouper_groups' where IsADGroup = '1'
> >
> > with a list of groups being returned.
> >
> >
> >
> > Alan
> >
> > --
> > Alan Rothenbush
> > IT Services
> > Simon Fraser University
> >
> > There is NOTHING -- absolutely nothing -- half so much worth doing
> > as simply messing about in boats.
> >
> >
>
> --
> Alan Rothenbush
> IT Services
> Simon Fraser University
>
> There is NOTHING -- absolutely nothing -- half so much worth doing
> as simply messing about in boats.
>
>

--
Alan Rothenbush
IT Services
Simon Fraser University

There is NOTHING -- absolutely nothing -- half so much worth doing
as simply messing about in boats.



Archive powered by MHonArc 2.6.16.

Top of Page