Skip to content

Comments

feat: snowflake export worker [CM-975]#3844

Open
mbani01 wants to merge 18 commits intomainfrom
feat/snowflake_export_worker
Open

feat: snowflake export worker [CM-975]#3844
mbani01 wants to merge 18 commits intomainfrom
feat/snowflake_export_worker

Conversation

@mbani01
Copy link
Contributor

@mbani01 mbani01 commented Feb 16, 2026

This pull request introduces a new "snowflake connectors" service for exporting data to Snowflake and managing export jobs. It adds the necessary database schema, service configuration, Docker setup, and initial implementation for export activities and scheduling. The main themes are the creation of the Snowflake export infrastructure, integration with the job scheduler, and updates to the monorepo's dependency management.

Snowflake Export Infrastructure

  • Added a new database table integration."snowflakeExportJobs" to track Snowflake export jobs, including fields for platform, S3 path, timestamps, and error handling, along with relevant indexes.
  • Added a unique constraint on the s3_path column to prevent duplicate export entries.
  • Modified the export jobs table to add an exportStartedAt timestamp and a metrics JSONB column, while removing the totalRows and totalBytes columns to support more flexible export metrics. [1] [2]
  • Implemented the core export activity logic in exportActivity.ts, which performs the Snowflake export and writes job metadata. [1] [2]

Service and Job Scheduling

  • Added a new service app @crowd/snowflake-connectors with its own dependencies, scripts, and Docker configuration. [1] [2] [3] [4]
  • Integrated a scheduled cron job in the cron service to trigger the Snowflake export workflow daily, using Temporal for orchestration.
  • Centralized Temporal configuration export in the new service.

Monorepo Dependency and Lockfile Updates

  • Updated pnpm-lock.yaml to include the new snowflake_connectors app and its dependencies, and adjusted AWS SDK dependency resolutions for compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Other Platform/Activity Updates

  • Added new Cvent-related activity types to the activityTypes table for event registration and attendance.

@joanagmaia you can help reviewing the export SQL and transformation


Note

Medium Risk
Adds new data pipeline components (Temporal workflows, S3 access, and DB job-claiming) and introduces new schema/migrations, which could impact export correctness and operational stability if misconfigured or if job claiming/transforming misbehaves.

Overview
Adds end-to-end Snowflake export infrastructure: a new integration."snowflakeExportJobs" table (with indexes/unique s3_path, exportStartedAt, and JSONB metrics) to track export batches, processing state, and errors.

Introduces a new services/apps/snowflake_connectors worker that runs Temporal workflows to COPY INTO S3 (batched) and a DB-polling consumer that claims pending jobs, reads Parquet from S3, resolves/creates integrations via Redis-backed lookups, and emits activity results; includes initial Cvent export SQL + transformer plus new Cvent activityTypes.

Wires the export into operations via a daily cron trigger in cron_service, adds Docker compose/build files for the new service, updates the monorepo lockfile, and extends @crowd/snowflake with SnowflakeClient.destroy() plus new organization source/attribute enums/priorities for cvent.

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

@mbani01 mbani01 self-assigned this Feb 18, 2026
@mbani01 mbani01 marked this pull request as ready for review February 20, 2026 17:08
@github-actions
Copy link
Contributor

⚠️ 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: snowflake export worker feat: snowflake export worker [CM-975] Feb 20, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

redis: {
enabled: true,
},
}
Copy link

Choose a reason for hiding this comment

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

Temporal worker disabled in configuration

High Severity

ServiceWorker is configured with temporal.enabled: false, but this service’s purpose is to run Temporal workflows/activities. If the archetype honors that flag, the worker won’t connect/register activities, so cron-triggered workflows on the snowflakeConnectors task queue never get processed.

Fix in Cursor Fix in Web

verified: true,
sourceId,
})
}
Copy link

Choose a reason for hiding this comment

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

Cvent identity mapping uses wrong fields

Medium Severity

The identity-building branch is keyed off userName, but it always adds an email identity with value: email (which can be undefined), and the else branch sets MemberIdentityType.USERNAME while still using value: email. This can emit invalid/incorrect member identities and misattribute users.

Fix in Cursor Fix in Web

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.

1 participant