Skip to content

Conversation

@mbani01
Copy link
Contributor

@mbani01 mbani01 commented Feb 9, 2026

This pull request introduces a new scheduled job to export data from Snowflake to S3 and significantly refactors the Snowflake client to support programmatic access token authentication in addition to key-pair authentication. It also updates dependencies to use the latest Snowflake SDK. The changes improve flexibility, security, and automation for Snowflake data exports.

Snowflake S3 Export Job:

  • Added a new job (snowflakeS3Export.job.ts) that exports batches of data from Snowflake to S3 as Parquet files, supporting incremental exports based on the last run timestamp, and tracks progress using Redis.

Snowflake Client Refactor:

  • Refactored the SnowflakeClient to support both programmatic access token and key-pair authentication, using a new configuration interface and dynamic connection options. [1] [2]
  • Added a static fromToken method to SnowflakeClient for convenient instantiation using environment variables for token-based authentication.

Dependency Updates:

  • Updated the snowflake-sdk dependency from version ^1.14.0 to ^2.3.3 to ensure compatibility with new features and authentication methods.
  • Added @crowd/snowflake as a dependency to the cron service to enable use of the new client and job.

Note

Medium Risk
Touches Snowflake authentication/connection setup and introduces an automated data export pipeline that writes to S3 and emits to Kafka, so misconfiguration could impact data movement or job stability.

Overview
Adds a new snowflake-s3-export cron job that incrementally exports EVENT_REGISTRATIONS from Snowflake to S3 as Parquet via COPY INTO, persists the last-run timestamp/manifest state in Redis, then reads the exported files back from S3 and emits mapped activities to Kafka.

Refactors SnowflakeClient to accept either key-pair or programmatic access token (PAT) authentication (including a new fromToken helper), and bumps snowflake-sdk to ^2.3.3 with @crowd/snowflake added to the cron service dependencies.

Written by Cursor Bugbot for commit b703935. This will update automatically on new commits. Configure here.

@mbani01 mbani01 self-assigned this Feb 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@mbani01 mbani01 changed the title feat: implement cronjob to export data from snowflake to s3 POC feat: implement cronjob to export data from snowflake to s3 POC [CM-945] Feb 9, 2026
@mbani01 mbani01 requested a review from themarolt February 10, 2026 10:59
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