
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@posthog/bigquery-plugin
Advanced tools
Send events to a BigQuery database on ingestion.
https://github.com/PostHog/bigquery-plugin
.json
file. (See below for permissions and how to retrieve this.)To set the right permissions up for the BigQuery plugin, you'll need:
Here's how to set these up so that the PostHog plugin has access only to the table it needs:
Create a service account. Keep hold of the JSON file at the end of these steps for setting up the plugin, and remember the name too.
Create a role which has only the specific permissions the PostHog BigQuery plugin requires (listed below), or use the built in BigQuery DataOwner
permission. If you create a custom role, you will need:
Create a dataset within a BigQuery project (ours is called posthog
, but any name will do).
Follow the instructions on granting access to a dataset in BigQuery to ensure your new service account has been granted either the role you created or the "BigQuery Data Owner" permission.
Use the Share Dataset button to share your dataset with your new service account and either the BigQuery DataOwner
role, or your custom role created above. In the below, we've used a custom role PostHog Ingest
.
That's it! Once you've done the steps above, your data should start flowing from PostHog to BigQuery.
There's a very rare case when duplicate events appear in BigQuery. This happens due to network errors, where the export seems to have failed, yet it actually reaches BigQuery.
While this shouldn't happen, if you find duplicate events in BigQuery, follow these Google Cloud docs to manually remove the them.
Here is an example query based on the Google Cloud docs that would remove duplicates:
WITH
-- first add a row number, one for each uuid
raw_data AS
(
SELECT
*,
ROW_NUMBER() OVER (PARTITION BY uuid) as ROW_NUMBER
from
`<project_id>.<dataset>.<table>`
WHERE
DATE(timestamp) = '<YYYY-MM-DD>'
),
-- now just filter for one row per uuid
raw_data_deduplicated AS
(
SELECT
* EXCEPT(ROW_NUMBER)
FROM
raw_data
WHERE
ROW_NUMBER = 1
)
SELECT
*
FROM
raw_data_deduplicated
;
FAQs
Export PostHog events to Amazon S3 on ingestion.
The npm package @posthog/bigquery-plugin receives a total of 4 weekly downloads. As such, @posthog/bigquery-plugin popularity was classified as not popular.
We found that @posthog/bigquery-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.