🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat(blob-export): promote Parquet to a whitelisted first-class export fileType (#14629)
Niklas Semmler6191e504b9e9
diff --git a/fern/apis/server/definition/blob-storage-integrations.yml b/fern/apis/server/definition/blob-storage-integrations.ymlindex e7f41fac66..ba135c5a1f 100644--- a/fern/apis/server/definition/blob-storage-integrations.yml+++ b/fern/apis/server/definition/blob-storage-integrations.yml@@ -48,6 +48,15 @@ types:- CSV- JSONL+ BlobStorageIntegrationFileTypeResponse:+ docs: |+ File type reported for an existing integration. Includes `PARQUET`, which a project may enable through the Langfuse UI but cannot yet be set via this API (the request `fileType` omits it).+ enum:+ - JSON+ - CSV+ - JSONL+ - PARQUET+BlobStorageExportMode:enum:- FULL_HISTORY@@ -157,7 +166,7 @@ types:exportFrequency: BlobStorageExportFrequencyenabled: booleanforcePathStyle: boolean- fileType: BlobStorageIntegrationFileType+ fileType: BlobStorageIntegrationFileTypeResponseexportMode: BlobStorageExportModeexportStartDate: nullable<datetime>compressed: booleandiff --git a/packages/shared/prisma/migrations/20260629000000_add_parquet_blob_storage_file_type/migration.sql b/packages/shared/prisma/migrations/20260629000000_add_parquet_blob_storage_file_type/migration.sqlnew file mode 100644index 0000000000..920ea39626--- /dev/null+++ b/packages/shared/prisma/migrations/20260629000000_add_parquet_blob_storage_file_type/migration.sql@@ -0,0 +1,2 @@+-- AlterEnum+ALTER TYPE "BlobStorageIntegrationFileType" ADD VALUE 'PARQUET';diff --git a/packages/shared/prisma/schema.prisma b/packages/shared/prisma/schema.prismaindex 5dc4f61d49..36aaea8fba 100644--- a/packages/shared/prisma/schema.prisma+++ b/packages/shared/prisma/schema.prisma@@ -1296,6 +1296,7 @@ enum BlobStorageIntegrationFileType {JSONCSVJSONL+ PARQUET@@map("BlobStorageIntegrationFileType")}diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.ymlindex 94548cfcd1..d3ff11bc36 100644--- a/web/public/generated/api/openapi.yml+++ b/web/public/generated/api/openapi.yml@@ -7378,6 +7378,18 @@ components:- JSON- CSV- JSONL+ BlobStorageIntegrationFileTypeResponse:+ title: BlobStorageIntegrationFileTypeResponse+ type: string+ enum:+ - JSON+ - CSV+ - JSONL+ - PARQUET+ description: >-+ File type reported for an existing integration. Includes `PARQUET`,+ which a project may enable through the Langfuse UI but cannot yet be set+ via this API (the request `fileType` omits it).BlobStorageExportMode:title: BlobStorageExportModetype: string@@ -7583,7 +7595,7 @@ components:forcePathStyle:type: booleanfileType:- $ref: '#/components/schemas/BlobStorageIntegrationFileType'+ $ref: '#/components/schemas/BlobStorageIntegrationFileTypeResponse'exportMode:$ref: '#/components/schemas/BlobStorageExportMode'exportStartDate:diff --git a/web/src/__tests__/server/blob-storage-integration-api.servertest.ts b/web/src/__tests__/server/blob-storage-integration-api.servertest.tsindex 6c8b009575..522b3ca8aa 100644--- a/web/src/__tests__/server/blob-storage-integration-api.servertest.ts+++ b/web/src/__tests__/server/blob-storage-integration-api.servertest.ts@@ -39,7 +39,9 @@ const BlobStorageIntegrationResponseSchema = z.object({exportFrequency: z.enum(["every_20_minutes", "hourly", "daily", "weekly"]),enabled: z.boolean(),forcePathStyle: z.boolean(),- fileType: z.enum(["JSON", "CSV", "JSONL"]),+ // Response-only PARQUET: reportable for UI-enabled projects, not creatable+ // via the API (mirrors BlobStorageIntegrationFileTypeResponse in Fern).+ fileType: z.enum(["JSON", "CSV", "JSONL", "PARQUET"]),exportMode: z.enum(["FULL_HISTORY", "FROM_TODAY", "FROM_CUSTOM_DATE"]),exportStartDate: z.coerce.date().nullable(),compressed: z.boolean(),@@ -1870,4 +1872,89 @@ describe("Blob Storage Integrations API", () => {expect(saved?.exportSource).toBe("EVENTS");});});++ describe("Parquet fileType stabilisation guards", () => {+ const seedParquetIntegration = () =>+ prisma.blobStorageIntegration.create({+ data: {+ projectId: testProject1Id,+ type: "S3",+ bucketName: "test-bucket",+ region: "us-east-1",+ accessKeyId: "test-access-key",+ secretAccessKey: "encrypted-secret",+ prefix: "langfuse-exports/",+ exportFrequency: "daily",+ enabled: true,+ forcePathStyle: false,+ fileType: "PARQUET",+ exportMode: "FULL_HISTORY",+ },+ });++ beforeEach(async () => {+ await prisma.blobStorageIntegration.deleteMany({+ where: { projectId: testProject1Id },+ });+ });++ afterAll(async () => {+ await prisma.blobStorageIntegration.deleteMany({+ where: { projectId: testProject1Id },+ });+ });++ it("rejects PARQUET as a request fileType", async () => {+ const result = await makeAPICall(+ "PUT",+ "/api/public/integrations/blob-storage",+ {+ ...validBlobStorageConfig,+ projectId: testProject1Id,+ fileType: "PARQUET",+ },+ createBasicAuthHeader(testApiKey, testApiSecretKey),+ );+ expect(result.status).toBe(400);+ expect(result.body.message).toContain("Invalid request data");+ });++ it("rejects any PUT against a Parquet-configured integration", async () => {+ await seedParquetIntegration();++ const result = await makeAPICall(+ "PUT",+ "/api/public/integrations/blob-storage",+ { ...validBlobStorageConfig, projectId: testProject1Id },+ createBasicAuthHeader(testApiKey, testApiSecretKey),+ );+ expect(result.status).toBe(400);+ expect(result.body.message).toContain("managed through the Langfuse UI");++ // No silent downgrade: the persisted integration is untouched.+ const saved = await prisma.blobStorageIntegration.findUnique({+ where: { projectId: testProject1Id },+ });+ expect(saved?.fileType).toBe("PARQUET");+ expect(saved?.compressed).toBe(true);+ });++ it("GET reports fileType PARQUET for a Parquet-configured integration", async () => {+ await seedParquetIntegration();++ const response = await makeZodVerifiedAPICall(+ BlobStorageIntegrationsResponseSchema,+ "GET",+ "/api/public/integrations/blob-storage",+ undefined,+ createBasicAuthHeader(testApiKey, testApiSecretKey),+ 200,+ );++ const integration = response.body.data.find(+ (i) => i.projectId === testProject1Id,+ );+ expect(integration?.fileType).toBe("PARQUET");+ });+ });});diff --git a/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts b/web/src/__tests__/server/blob-storage-integration-trpc.servertest.tsindex cd74f93994..ee87d858d9 100644--- a/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts+++ b/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts@@ -43,6 +43,14 @@ vi.mock("@langfuse/shared/src/server", async () => {};});+// The parquet whitelist ships as an in-code constant (empty by default), so the+// helper is mocked to exercise both sides of the gate deterministically.+const isParquetFileTypeAllowedMock = vi.hoisted(() => vi.fn(() => false));++vi.mock("@/src/features/blobstorage-integration/parquetFileType", () => ({+ isParquetFileTypeAllowed: isParquetFileTypeAllowedMock,+}));+const __orgIds: string[] = [];const prepare = async () => {@@ -1048,4 +1056,108 @@ describe("Blob Storage Integration tRPC Router", () => {expect(row.exportSource).toBe("TRACES_OBSERVATIONS");});});++ describe("parquet fileType whitelist gate", () => {+ beforeEach(() => {+ isParquetFileTypeAllowedMock.mockReset();+ isParquetFileTypeAllowedMock.mockReturnValue(false);+ });++ it("rejects changing fileType to PARQUET for a non-whitelisted project", async () => {+ const { caller, project } = await prepare();++ await expect(+ caller.blobStorageIntegration.update({+ projectId: project.id,+ ...baseConfig,+ fileType: "PARQUET" as const,+ }),+ ).rejects.toThrow("Parquet export is not available for this project.");++ const row = await prisma.blobStorageIntegration.findUnique({+ where: { projectId: project.id },+ });+ expect(row).toBeNull();+ });++ it("persists PARQUET for a whitelisted project", async () => {+ isParquetFileTypeAllowedMock.mockReturnValue(true);+ const { caller, project } = await prepare();++ await caller.blobStorageIntegration.update({+ projectId: project.id,+ ...baseConfig,+ fileType: "PARQUET" as const,+ });++ const row = await prisma.blobStorageIntegration.findUniqueOrThrow({+ where: { projectId: project.id },+ });+ expect(row.fileType).toBe("PARQUET");+ });++ it("still saves edits for a de-whitelisted project that already persists PARQUET", async () => {+ const { caller, project } = await prepare();+ await createIntegration({ projectId: project.id });+ await prisma.blobStorageIntegration.update({+ where: { projectId: project.id },+ data: { fileType: "PARQUET" },+ });++ // Whitelist off: only a *change to* PARQUET is gated, so re-submitting the+ // persisted PARQUET alongside an unrelated edit must not lock the user out.+ await caller.blobStorageIntegration.update({+ projectId: project.id,+ ...baseConfig,+ fileType: "PARQUET" as const,+ enabled: false,+ });++ const row = await prisma.blobStorageIntegration.findUniqueOrThrow({+ where: { projectId: project.id },+ });+ expect(row.fileType).toBe("PARQUET");+ expect(row.enabled).toBe(false);+ });++ it("preserves persisted PARQUET when fileType is omitted from the update input", async () => {+ // Without the router-level .optional() the base schema would default an+ // omitted fileType to JSONL and silently downgrade the persisted PARQUET.+ const { caller, project } = await prepare();+ await createIntegration({ projectId: project.id });+ await prisma.blobStorageIntegration.update({+ where: { projectId: project.id },+ data: { fileType: "PARQUET" },+ });++ const { fileType: _fileType, ...configWithoutFileType } = baseConfig;+ await caller.blobStorageIntegration.update({+ projectId: project.id,+ ...configWithoutFileType,+ enabled: false,+ });++ const row = await prisma.blobStorageIntegration.findUniqueOrThrow({+ where: { projectId: project.id },+ });+ expect(row.fileType).toBe("PARQUET");+ expect(row.enabled).toBe(false);+ });++ it("defaults to JSONL when fileType is omitted on CREATE", async () => {+ // The Prisma column default is CSV; the historical Zod default was JSONL.+ const { caller, project } = await prepare();++ const { fileType: _fileType, ...configWithoutFileType } = baseConfig;+ await caller.blobStorageIntegration.update({+ projectId: project.id,+ ...configWithoutFileType,+ });++ const row = await prisma.blobStorageIntegration.findUniqueOrThrow({+ where: { projectId: project.id },+ });+ expect(row.fileType).toBe("JSONL");+ });+ });});diff --git a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts b/web/src/features/blobstorage-integration/blobstorage-integration-router.tsindex 096bf6a699..cf04b48157 100644--- a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts+++ b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts@@ -29,9 +29,11 @@ import { decrypt } from "@langfuse/shared/encryption";import {AnalyticsIntegrationExportSource,BlobStorageIntegrationType,+ BlobStorageIntegrationFileType,InvalidRequestError,isEnrichedBlobExportAvailable,} from "@langfuse/shared";+import { isParquetFileTypeAllowed } from "@/src/features/blobstorage-integration/parquetFileType";const getAuditLogErrorType = (error: unknown) =>error instanceof TRPCError@@ -106,6 +108,9 @@ export const blobStorageIntegrationRouter = createTRPCRouter({// Drop the base schema default so an omitted value preserves the// persisted source instead of rewriting it to the legacy default.exportSource: z.enum(AnalyticsIntegrationExportSource).optional(),+ // Same for fileType: the base default (JSONL) would silently+ // downgrade a persisted PARQUET past the change-to-Parquet gate.+ fileType: z.enum(BlobStorageIntegrationFileType).optional(),}).superRefine(validateAzureContainerName).superRefine(validateExportFieldGroups),@@ -122,15 +127,23 @@ export const blobStorageIntegrationRouter = createTRPCRouter({const isV4PreviewEnabled =env.LANGFUSE_MIGRATION_V4_ALLOW_PREVIEW_OPT_IN === "true";- // Feeds both gates: the legacy gate needs createdAt for an explicit- // source; the enriched gate needs the persisted source to reject a- // stale enriched value on an omitted update.const existingIntegration =await ctx.prisma.blobStorageIntegration.findUnique({where: { projectId: input.projectId },- select: { createdAt: true, exportSource: true },+ select: { createdAt: true, exportSource: true, fileType: true },});+ // Gate only a *change to* PARQUET — not re-submission of an already-persisted value.+ const isChangingToParquet =+ input.fileType === BlobStorageIntegrationFileType.PARQUET &&+ existingIntegration?.fileType !==+ BlobStorageIntegrationFileType.PARQUET;+ if (isChangingToParquet && !isParquetFileTypeAllowed(input.projectId)) {+ throw new InvalidRequestError(+ "Parquet export is not available for this project.",+ );+ }+// Legacy gate checks explicit values only; omitted preserves the row,// CREATE is covered by forceEventsOnCreate below.if (input.exportSource) {diff --git a/web/src/features/blobstorage-integration/parquetFileType.clienttest.ts b/web/src/features/blobstorage-integration/parquetFileType.clienttest.tsnew file mode 100644index 0000000000..71256f4c3d--- /dev/null+++ b/web/src/features/blobstorage-integration/parquetFileType.clienttest.ts@@ -0,0 +1,27 @@+import { describe, expect, it } from "vitest";+import {+ PARQUET_FILE_TYPE_PROJECT_IDS,+ isParquetFileTypeAllowed,+} from "@/src/features/blobstorage-integration/parquetFileType";++describe("isParquetFileTypeAllowed", () => {+ it("returns false for a project that is not whitelisted", () => {+ expect(isParquetFileTypeAllowed("not-a-whitelisted-project-id")).toBe(+ false,+ );+ });++ it("reflects membership in PARQUET_FILE_TYPE_PROJECT_IDS", () => {+ // Equivalence check that stays correct and non-vacuous whether the shipped+ // whitelist is empty or populated: the helper must return true exactly for+ // ids in the constant. The appended non-member guarantees at least one real+ // assertion runs (so the test can't pass vacuously while the list is empty)+ // and would catch a regression to `return true`; every entry actually in+ // the list (once populated) guards against `return false`.+ for (const id of [...PARQUET_FILE_TYPE_PROJECT_IDS, "not-in-the-list"]) {+ expect(isParquetFileTypeAllowed(id)).toBe(+ PARQUET_FILE_TYPE_PROJECT_IDS.includes(id),+ );+ }+ });+});diff --git a/web/src/features/blobstorage-integration/parquetFileType.ts b/web/src/features/blobstorage-integration/parquetFileType.tsnew file mode 100644index 0000000000..780fa6f48e--- /dev/null+++ b/web/src/features/blobstorage-integration/parquetFileType.ts@@ -0,0 +1,14 @@+// In-code whitelist gating the first-class `fileType = PARQUET` option while+// it stabilises. Projects on the legacy `exportTuning.parquet` override do not+// need to be listed here — that path is independent (see worker parquetEligible).++export const PARQUET_FILE_TYPE_PROJECT_IDS: readonly string[] = [+ "cmpyefoyg03yiad0jeoymrmcv",+];++const PARQUET_FILE_TYPE_PROJECT_ID_SET = new Set(PARQUET_FILE_TYPE_PROJECT_IDS);++/** True when a project may select Parquet as its fileType. */+export function isParquetFileTypeAllowed(projectId: string): boolean {+ return PARQUET_FILE_TYPE_PROJECT_ID_SET.has(projectId);+}diff --git a/web/src/features/blobstorage-integration/service.ts b/web/src/features/blobstorage-integration/service.tsindex a63dbca3f5..4ec8d49590 100644--- a/web/src/features/blobstorage-integration/service.ts+++ b/web/src/features/blobstorage-integration/service.ts@@ -7,7 +7,7 @@ import {LEGACY_BLOB_EXPORT_SOURCES,LEGACY_BLOB_EXPORTER_CUTOFF,isLegacyBlobExporter,- type BlobStorageIntegrationFileType,+ BlobStorageIntegrationFileType,type ObservationFieldGroupFull,} from "@langfuse/shared";import { encrypt } from "@langfuse/shared/encryption";@@ -25,7 +25,9 @@ type UpsertBlobStorageIntegrationInput = {exportFrequency: string;enabled: boolean;forcePathStyle: boolean;- fileType: BlobStorageIntegrationFileType;+ // Optional: undefined preserves the persisted value on UPDATE (Prisma omits+ // the column) and falls back to JSONL on CREATE.+ fileType?: BlobStorageIntegrationFileType;exportMode: BlobStorageExportMode;exportStartDate: Date | null;exportSource?: AnalyticsIntegrationExportSource;@@ -156,6 +158,9 @@ export async function upsertBlobStorageIntegration(params: {create: {...writeData,exportSource: createExportSource,+ // The Prisma column default is CSV; keep the historical JSONL default+ // when the caller omits fileType on CREATE.+ fileType: data.fileType ?? BlobStorageIntegrationFileType.JSONL,projectId,secretAccessKey: encryptedSecret,},diff --git a/web/src/features/public-api/types/blob-storage-integrations.ts b/web/src/features/public-api/types/blob-storage-integrations.tsindex 7170da24d7..d616427695 100644--- a/web/src/features/public-api/types/blob-storage-integrations.ts+++ b/web/src/features/public-api/types/blob-storage-integrations.ts@@ -22,6 +22,20 @@ export const BlobStorageIntegrationType = z.enum([export const BlobStorageIntegrationFileType = z.enum(["JSON", "CSV", "JSONL"]);+// Response-only file type. Parquet is a first-class fileType that the public API+// cannot yet *create* (the request enum above intentionally omits it, gating it+// behind an in-code project whitelist on the web side), but a project that+// enabled Parquet through the UI persists `PARQUET`, so the API must be able to+// *report* it. Adding a value to the response enum is additive/backwards+// compatible. Promote PARQUET into the request enum once it is generally+// available.+export const BlobStorageIntegrationFileTypeResponse = z.enum([+ "JSON",+ "CSV",+ "JSONL",+ "PARQUET",+]);+export const BlobStorageExportMode = z.enum(["FULL_HISTORY","FROM_TODAY",@@ -159,7 +173,7 @@ export const BlobStorageIntegrationResponse = zexportFrequency: z.string(),enabled: z.boolean(),forcePathStyle: z.boolean(),- fileType: BlobStorageIntegrationFileType,+ fileType: BlobStorageIntegrationFileTypeResponse,exportMode: BlobStorageExportMode,exportStartDate: z.coerce.date().nullable(),compressed: z.boolean(),diff --git a/web/src/pages/api/public/integrations/blob-storage/index.ts b/web/src/pages/api/public/integrations/blob-storage/index.tsindex b2e2d0f39d..3df4bef06a 100644--- a/web/src/pages/api/public/integrations/blob-storage/index.ts+++ b/web/src/pages/api/public/integrations/blob-storage/index.ts@@ -12,6 +12,8 @@ import {} from "@/src/features/public-api/types/blob-storage-integrations";import {type ObservationFieldGroupFull,+ BlobStorageIntegrationFileType,+ InvalidRequestError,LangfuseNotFoundError,UnauthorizedError,ForbiddenError,@@ -172,9 +174,23 @@ async function handleUpsertBlobStorageIntegration(// enriched value is rejected.const existingIntegration = await prisma.blobStorageIntegration.findUnique({where: { projectId: validatedData.projectId },- select: { createdAt: true, exportSource: true },+ select: { createdAt: true, exportSource: true, fileType: true },});+ // PARQUET cannot be set via the REST API yet (request enum omits it). Block+ // any PUT that would silently downgrade a Parquet integration to a text format.+ // Written as a downgrade check (existing === PARQUET && request !== PARQUET) so+ // it automatically narrows to no-op once PARQUET is added to the request enum at GA.+ const requestFileType: string = validatedData.fileType;+ if (+ existingIntegration?.fileType === BlobStorageIntegrationFileType.PARQUET &&+ requestFileType !== BlobStorageIntegrationFileType.PARQUET+ ) {+ throw new InvalidRequestError(+ "Integrations exporting Parquet must be managed through the Langfuse UI; the public API cannot modify them while Parquet is in stabilisation.",+ );+ }+if (internalExportSource) {assertLegacyBlobExportSourceAllowedForUpsert({project,diff --git a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsxindex e06564edf2..0baf3bc558 100644--- a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx+++ b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx@@ -34,6 +34,7 @@ import {type BlobStorageIntegrationFormSchema,type BlobStorageSyncStatus,} from "@/src/features/blobstorage-integration/types";+import { isParquetFileTypeAllowed } from "@/src/features/blobstorage-integration/parquetFileType";import { deriveSyncStatus } from "@/src/features/blobstorage-integration/deriveSyncStatus";import { Alert, AlertTitle, AlertDescription } from "@/src/components/ui/alert";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";@@ -377,6 +378,11 @@ const BlobStorageIntegrationSettingsForm = ({// Internal `exportTuning.parquet` override (no write path); reflected read-only// below since the worker forces Parquet over the persisted fileType + gzip.const isParquetOverride = parquetEnabledFromTuning(state?.exportTuning);+ const isParquetWhitelisted = isParquetFileTypeAllowed(projectId);+ const watchedFileType = blobStorageForm.watch("fileType");+ const isParquetExport =+ isParquetOverride ||+ watchedFileType === BlobStorageIntegrationFileType.PARQUET;const exportSourceOptions = getExportSourceOptions(state?.exportSource,availability,@@ -705,7 +711,6 @@ const BlobStorageIntegrationSettingsForm = ({<FormItem><FormLabel>File Type</FormLabel><FormControl>- {/* "PARQUET" is display-only; the persisted fileType is kept but ignored. */}<Selectvalue={isParquetOverride ? "PARQUET" : field.value}onValueChange={field.onChange}@@ -718,7 +723,10 @@ const BlobStorageIntegrationSettingsForm = ({<SelectItem value="JSONL">JSONL</SelectItem><SelectItem value="CSV">CSV</SelectItem><SelectItem value="JSON">JSON</SelectItem>- {isParquetOverride && (+ {(isParquetWhitelisted ||+ isParquetOverride ||+ watchedFileType ===+ BlobStorageIntegrationFileType.PARQUET) && (<SelectItem value="PARQUET">Parquet</SelectItem>)}</SelectContent>@@ -727,7 +735,9 @@ const BlobStorageIntegrationSettingsForm = ({<FormDescription>{isParquetOverride? "Exporting as Apache Parquet — a columnar binary format encoded and compressed by ClickHouse. This is configured for your project and overrides the file type; gzip compression is not applicable."- : "The file format for exported data."}+ : field.value === BlobStorageIntegrationFileType.PARQUET+ ? "Apache Parquet — a columnar binary format encoded and compressed by ClickHouse. Gzip compression does not apply."+ : "The file format for exported data."}</FormDescription><FormMessage /></FormItem>@@ -914,7 +924,7 @@ const BlobStorageIntegrationSettingsForm = ({)}</div><div className="text-muted-foreground text-xs">- {isParquetOverride+ {isParquetExport? isLegacyOnlyExport? option.legacyParquetDescription: option.parquetDescription@@ -972,7 +982,7 @@ const BlobStorageIntegrationSettingsForm = ({)}{/* Parquet compresses internally — gzip does not apply. */}- {!isParquetOverride && (+ {!isParquetExport && (<FormFieldcontrol={blobStorageForm.control}name="compressed"diff --git a/worker/src/__tests__/blobStorageTuningWiring.unit.test.ts b/worker/src/__tests__/blobStorageTuningWiring.unit.test.tsindex eb65c856f2..1d752d9cfd 100644--- a/worker/src/__tests__/blobStorageTuningWiring.unit.test.ts+++ b/worker/src/__tests__/blobStorageTuningWiring.unit.test.ts@@ -188,6 +188,25 @@ describe("handleBlobStorageIntegrationProjectJob tuning wiring", () => {}});+ // First-class PARQUET fileType (no exportTuning.parquet) routes through the+ // same Parquet path as the legacy override.+ it("produces .parquet files when fileType is PARQUET without the tuning override", async () => {+ (prisma.blobStorageIntegration.findUnique as any).mockResolvedValue({+ ...baseRow(undefined),+ fileType: "PARQUET",+ compressed: true,+ });++ await handleBlobStorageIntegrationProjectJob(makeJob());++ expect(uploadCalls.length).toBe(3);+ for (const call of uploadCalls) {+ expect(call.fileName.endsWith(".parquet")).toBe(true);+ expect(call.fileName).not.toContain(".gz");+ expect(call.fileType).toBe("application/vnd.apache.parquet");+ }+ });+it("parquet takes precedence over rawPassthrough", async () => {(prisma.blobStorageIntegration.findUnique as any).mockResolvedValue({...baseRow({ parquet: true, rawPassthrough: true }),diff --git a/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts b/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.tsindex cd621e451d..3316c17f54 100644--- a/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts+++ b/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts@@ -52,6 +52,7 @@ import { WORKER_HOST_ID } from "../../utils/hostId";import {BlobStorageIntegrationType,BlobStorageIntegrationFileType,+ BatchExportFileFormat,BlobStorageExportMode,OBSERVATION_FIELD_GROUPS_FULL,type ObservationFieldGroupFull,@@ -82,9 +83,12 @@ export const BlobExportFormat = {export type BlobExportFormat =(typeof BlobExportFormat)[keyof typeof BlobExportFormat];-const FORMAT_LOOKUP: Record<- BlobStorageIntegrationFileType,- { raw: BlobExportFormat; gzip: BlobExportFormat }+// Text formats only; PARQUET is absent because callers branch on parquetEligible first.+const FORMAT_LOOKUP: Partial<+ Record<+ BlobStorageIntegrationFileType,+ { raw: BlobExportFormat; gzip: BlobExportFormat }+ >> = {[BlobStorageIntegrationFileType.JSON]: {raw: BlobExportFormat.JSON_RAW,@@ -105,6 +109,9 @@ function resolveBlobExportFormat(compressed: boolean,): BlobExportFormat {const entry = FORMAT_LOOKUP[fileType];+ if (!entry) {+ throw new Error(`No text export format for file type: ${fileType}`);+ }return compressed ? entry.gzip : entry.raw;}@@ -269,6 +276,11 @@ const getFileTypeProperties = (fileType: BlobStorageIntegrationFileType) => {contentType: "application/x-ndjson; charset=utf-8",extension: "jsonl",};+ case BlobStorageIntegrationFileType.PARQUET:+ return {+ contentType: "application/vnd.apache.parquet",+ extension: "parquet",+ };default:// eslint-disable-next-line no-case-declarationsconst _exhaustiveCheck: never = fileType;@@ -428,12 +440,10 @@ const processBlobStorageExport = async (config: {try {const blobStorageProps = getFileTypeProperties(config.fileType);- // LFE-10463: per-project opt-in spanning all tables/file types. Overrides- // fileType and compressed (Parquet compresses internally) and outranks- // rawPassthrough (enforced in resolveBlobExportTuning). It isn't a- // BlobStorageIntegrationFileType member, so extension/content-type are set- // inline below rather than via getFileTypeProperties.- const parquetEligible = config.parquet;+ // Both paths converge: legacy exportTuning.parquet override and the new fileType=PARQUET.+ const parquetEligible =+ config.parquet ||+ config.fileType === BlobStorageIntegrationFileType.PARQUET;// Raw passthrough (LFE-10402) is opt-in per project and only valid for// JSONL output of the enriched-observation tables — the only formats@@ -699,7 +709,13 @@ const processBlobStorageExport = async (config: {}const dataStream = countedStream(rawStream, sourceStats);- const formatTransform = streamTransformations[config.fileType]();+ if (config.fileType === BlobStorageIntegrationFileType.PARQUET) {+ throw new Error(+ `Reached the text-format export path with fileType=PARQUET for project ${config.projectId}; the parquetEligible branch should have handled it`,+ );+ }+ const formatTransform =+ streamTransformations[config.fileType as BatchExportFileFormat]();fileStream =compressedCounter && gzipStats@@ -1205,6 +1221,9 @@ export const handleBlobStorageIntegrationProjectJob = async (// dispatch and is intentionally not warned about (avoids ~hourly log noise).if (exportTuning.rawPassthrough &&+ !exportTuning.parquet &&+ blobStorageIntegration.fileType !==+ BlobStorageIntegrationFileType.PARQUET &&(blobStorageIntegration.fileType !==BlobStorageIntegrationFileType.JSONL ||isTraceOnlyProject)