This message was deleted.
# opal
s
This message was deleted.
o
HI @Avo Sepp šŸ™‚ Your questions are welcome. I’m not that familiar with CosomsDB (Googling as I’m typing this šŸ˜…) - but if it provides an HTTP Api you can use the builtin Http data-fetcher
a
You found it faster than I did! Thank you
šŸ’œ 1
o
Got a blackbelt in googling , working on my chatGPT skillz now šŸ˜›
Note you might still want to fork the HTTP fetcher, just to change the processing a bit - as it seems that the API call also returns a lot of metadata you might need to remove
a
eek. Okay good to know.
o
Don’t worry it’s super easy to do. Say you only want a specific field called ā€œmagicā€ from a document - Basically replace line 109 here - instead of
return data
with
return data['magic']
a
I think a link is missing
o
Indeed . Fixed
a
In the case of forking this code. Should I fork the repo and be building on our own pipelines? Right now I’ve just installed via Permit’s public Helm chart.
I guess it’s python. I can just insert the modified .py?
o
Yep. Data-fetchers are extensible modules. You basically make a copy of that file and save it in the save folder under a different name, and you use that name in the event you trigger
We can also look at maybe adding some filtering logic to the built-in HTTP fetcher - as part of it’s config
a
that would be pretty useful.
o
You feel like tackling/ contributing it? Alternatively I can get to it this weekend
šŸ‘€ 1
a
If I have some time, could be fun
o
Swag package guaranteed - and of course undying fame as an OSS contributor šŸ˜‡
ā¤ļø 1
a
I’ll give it a look. haha. If it helps me understand OPAL/OPA better. Can’t hurt.
Does OPAL offer any sort of transform functionality? Or should I make sure the database I’ll pull from is transformed beforehand.
o
Custom Data-fetchers are the components that are usually used to transform data - same
process
method we’ve been discussing. This filter mechanic can be a first start for builtin transforming logic. We can also look at potentially using the Rego policy to do transformations - though that’s quite a bit of work
a
I had a feeling you’d say custom data-fetchers. haha
šŸ˜… 1