Skip to content

Commit

Permalink
add Snowflake mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Jan 7, 2025
1 parent 7e55465 commit 6309cab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions connectors/src/connectors/snowflake/temporal/activities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ModelId } from "@dust-tt/types";
import { isSnowflakeCredentials } from "@dust-tt/types";
import { isSnowflakeCredentials, SNOWFLAKE_MIME_TYPES } from "@dust-tt/types";

import {
connectToSnowflake,
Expand Down Expand Up @@ -172,7 +172,7 @@ export async function syncSnowflakeConnection(connectorId: ModelId) {
],
parentId: `${table.databaseName}.${table.schemaName}`,
title: table.name,
mimeType: "application/vnd.snowflake.table",
mimeType: SNOWFLAKE_MIME_TYPES.TABLE,
});
await table.update({
lastUpsertedAt: new Date(),
Expand Down
10 changes: 9 additions & 1 deletion types/src/shared/internal_mime_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,19 @@ export const SLACK_MIME_TYPES = {
export type SlackMimeType =
(typeof SLACK_MIME_TYPES)[keyof typeof SLACK_MIME_TYPES];

export const SNOWFLAKE_MIME_TYPES = {
TABLE: "application/vnd.snowflake.table",
};

export type SnowflakeMimeType =
(typeof SNOWFLAKE_MIME_TYPES)[keyof typeof SNOWFLAKE_MIME_TYPES];

export type DustMimeType =
| ConfluenceMimeType
| GithubMimeType
| GoogleDriveMimeType
| IntercomMimeType
| MicrosoftMimeType
| NotionMimeType
| SlackMimeType;
| SlackMimeType
| SnowflakeMimeType;

0 comments on commit 6309cab

Please sign in to comment.