You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thought I'd try joining the hackernews_new table with the net_http_request table to try and send slack messages for new items ... fun idea, but unfortunately it doesn't work because of the postgres plan. I couldn't find a way to trick it either.
with new_posts as (
select
'{"text": "' || title || '"}' as slack_msg
from
hackernews_new
where
time > now() - interval '1 min'
order by
time desc
)
select
r.url,
r.method,
r.response_status_code,
jsonb_pretty(r.request_headers) as request_headers,
r.response_body
from
net_http_request as r,
new_posts as p
where
r.url = 'https://hooks.slack.com/services/<redacted>/<redacted>/<redacted>'
and r.method = 'POST'
and r.request_body = p.slack_msg
and r.request_headers = '{"content-type": "application/json"}'::jsonb
Here is the quals log I see:
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: [DEBUG] 165980314538: listBaseRequestAttributes: urls=["https://hooks.slack.com/services/<redacted>/<redacted>/<redacted>"]
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: [DEBUG] 165980314538: listBaseRequestAttributes:
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: query cols=
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | request_body = ?
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | url = https://hooks.slack.com/services/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
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | method = POST
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | request_headers = {
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | "content-type": "application/json"
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | }
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin:
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: [DEBUG] 165980314538: listBaseRequestAttributes:
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: request headers=
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | {
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | "content-type": "application/json"
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin: | }
2022-08-06 16:25:45.345 UTC [DEBUG] steampipe-plugin-net.plugin:
The text was updated successfully, but these errors were encountered:
Thought I'd try joining the
hackernews_new
table with thenet_http_request
table to try and send slack messages for new items ... fun idea, but unfortunately it doesn't work because of the postgres plan. I couldn't find a way to trick it either.Here is the quals log I see:
The text was updated successfully, but these errors were encountered: