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

added new backend - postgres db #858

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

grittyashish
Copy link

A new backend for fetching data from postgres db.
This backend works with SSL and non-SSL configured postgres databases.
For SSL postgres db, provide location of certificates and client key and choose the appropriate ssl mode.
This backend can be easily modified to add new categories, aka queries.

Provide the URL/endpoint, database name, username, password file's location and category as environment variable
usage : perceval postgresdb --url $url --db $db --usr $usr --passw $passw --category $CATEGORY

Tested using local postgres database running on port 5432(default postgres port).

Attached are outputs from the test run :
Screenshot from 2025-01-24 11-37-11
Screenshot from 2025-01-24 11-36-55
Screenshot from 2025-01-24 11-36-30
Screenshot from 2025-01-24 11-36-14

Signed-off-by: Ashish Kumar Choubey <[email protected]>
@grittyashish grittyashish deleted the pg-db branch January 24, 2025 08:03
@grittyashish grittyashish restored the pg-db branch January 24, 2025 08:03
@grittyashish
Copy link
Author

grittyashish commented Jan 24, 2025

@jjmerchante @sduenas Unable to add any of you as reviewer so tagging here.
Please let me know your views on this and any modifications that you require in this in order for it to merge into main.

@grittyashish grittyashish reopened this Jan 24, 2025
@GeorgLink
Copy link
Member

Hi @grittyashish , thank you for opening the PR.

I want to understand the use case and your motivation for creating this. Was there an issue or some other discussion for the need for this new feature?

@grittyashish
Copy link
Author

Hi @GeorgLink
We are using Grimoirelab at our organization to pull in and analyze data from various sources whose backends are already present. However one of our requirements also was to pull in data from one of the postgres servers that we have at our organization. In the course of working on it I developed this backend.
It is thoroughly tested to ensure no disruption to existing functionality
This enhancement aligns with project goals and benefits the broader community. I appreciate your feedback and am happy to address any concerns!

@GeorgLink
Copy link
Member

Thanks @grittyashish, for the added background. Typically, in open source, the conversation around a new contribution to an open source project starts with an issue. It would start with a discussion around the requirements and how a solution would fit in. It appears to me that, in your case, you have already developed a solution without discussing with the community first. I'm happy this solution works well for you and your company. I would strongly suggest, to now have the community discussion. I'm not a maintainer, so I cannot speak to the technical requirements and how a Postgres integration should work; but I suspect opening an issue with a feature request would be a good next step.

As an alternative step, until such a discussion is complete, you could request to list your solution on the Community Components page.

Finally, you are contributing from a seemingly brand-new GitHub account without an indication of who you are or who you work for (at least I didn't see that information). Could you introduce yourself, so we may get to know you?

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

Successfully merging this pull request may close these issues.

2 participants