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

Unable to query gitlab_user with a join #77

Open
xonstone opened this issue Jul 4, 2024 · 0 comments
Open

Unable to query gitlab_user with a join #77

xonstone opened this issue Jul 4, 2024 · 0 comments

Comments

@xonstone
Copy link

xonstone commented Jul 4, 2024

Hi

I'm trying to query the gitlab_user table with users that are in a group: gitlab_group_member but I keep running into the same error. This is on gitlab.com:

Query 1 ERROR at Line 1: : ERROR:  rpc error: code = Unknown desc = when using the gitlab_user table with GitLab Cloud, `List` call requires an '=' qualifier for one or more of the following columns: 'id', 'username'

This are the queries I tried:

SELECT
	*
FROM
	gitlab_group_member AS m,
	gitlab_user AS u
WHERE
	u.id = m.id
	AND group_id = <group_id>;
SELECT
	*
FROM (
	SELECT
		id AS group_member_id
	FROM
		gitlab_group_member
	WHERE
		group_id = <group_id>) AS m, gitlab_user
WHERE
	id = group_member_id;
SELECT
	*
FROM
	gitlab_group_member AS m
	JOIN gitlab_user AS u ON u.id = m.id
WHERE
	group_id = <group_id>;
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

1 participant