Skip to content

Add Anchor Impressions Support#172

Open
mre wants to merge 3 commits intomainfrom
anchor-impressions
Open

Add Anchor Impressions Support#172
mre wants to merge 3 commits intomainfrom
anchor-impressions

Conversation

@mre
Copy link
Member

@mre mre commented Dec 24, 2024

Introduce support for anchor impressions, including the necessary database schema changes and API integration to handle impression data.

See https://github.com/openpodcast/anchor-connector/pull/5

Copy link
Contributor

@woolfg woolfg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, just smaller remarks...especially about the schema

total_impressions INTEGER NOT NULL,
total_considerations INTEGER NOT NULL,
total_streams INTEGER NOT NULL,
considerations_conversion_rate DECIMAL(10,5),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is percent and is always smaller than 0 I would suggest to store the value as a promille, so just unsigned 4 digits are fine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the context and the fact that this is an API data format that we don't control, I think the current approach is reasonable. The conversion to promille would require more changes in the application logic and might not provide significant benefits over the current decimal representation.

I'd like to keep the current implementation since the data format comes from the external API and the current storage is adequate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 vs. 6 bytes, but ok, DECIMAL(9,5) would be at least just 5 bytes, or (5,3) would be also sufficient for a percent

@mre mre changed the title Add anchor impressions support with database schema and API integration Add Spotify Impressions Support Aug 13, 2025
@mre mre force-pushed the anchor-impressions branch from a35a51f to a2b8f13 Compare August 13, 2025 13:21
@mre mre requested a review from woolfg August 13, 2025 13:21
- Add null check for rawPayload.range in impressions endpoint
- Fix type conversion by using correct payload.data.data structure
- Exclude test files from TypeScript build to prevent Jest type errors
Copy link
Contributor

@woolfg woolfg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the same for spotify, then we could rename the tables to spotify and use it for anchor and spotify?

@mre mre changed the title Add Spotify Impressions Support Add Anchor Impressions Support Aug 26, 2025
@mre
Copy link
Member Author

mre commented Aug 29, 2025

@woolfg is this still needed or shall we close it? I think we don't need it anymore as Anchor is already on its way out.

@woolfg
Copy link
Contributor

woolfg commented Aug 30, 2025

considering openpodcast/pipelines#90 (comment) we might reuse the spotify api but we need a new mapping table or the additional information about the spoitify id. I have seen it already somewhere, maybe metadata of episodes. this would be sufficient.

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