{"record":{"id":"fb64868a382e41d1","repo":"cube-js/cube","slug":"no-csv-files-were-obtained-from-the-bucket","errorCode":null,"errorMessage":"No CSV files were obtained from the bucket","messagePattern":"No CSV files were obtained from the bucket","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-base-driver/src/storage-fs/azure.fs.ts","lineNumber":141,"sourceCode":"  const url = `https://${account}.blob.core.windows.net`;\n  blobServiceClient = azureConfig.sasToken ?\n    new BlobServiceClient(`${url}?${azureConfig.sasToken}`) :\n    new BlobServiceClient(url, credential);\n\n  const csvFiles: string[] = [];\n  const containerClient = blobServiceClient.getContainerClient(container);\n  const blobsList = containerClient.listBlobsFlat({ prefix: `${tableName}` });\n  for await (const blob of blobsList) {\n    if (blob.name && (blob.name.endsWith('.csv.gz') || blob.name.endsWith('.csv'))) {\n      const starts = new Date();\n      const expires = new Date(starts.valueOf() + 1000 * 60 * 60);\n      const sas = await getSas(blob.name, starts, expires);\n      csvFiles.push(`${url}/${container}/${blob.name}?${sas}`);\n    }\n  }\n\n  if (csvFiles.length === 0) {\n    throw new Error('No CSV files were obtained from the bucket');\n  }\n\n  return csvFiles;\n}\n","sourceCodeStart":123,"sourceCodeEnd":146,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-base-driver/src/storage-fs/azure.fs.ts#L123-L146","documentation":"Empty-result guard in extractFilesFromAzure (azure.fs.ts storage-fs): the listing of the Azure Blob container with the given table-name prefix returned no blobs whose names end in .csv or .csv.gz. It fires when an export-to-bucket load finds nothing to import — typically because the unload wrote to a different container/prefix or the export never ran.","triggerScenarios":"The Azure container contains no CSV blobs matching the unload output (empty or wrong container/prefix) after an unload run.","commonSituations":"Unload to the wrong container, missing storage permissions so blobs never got written, expired/insufficient SAS generation, typo in container or path prefix.","solutions":["Verify the container name and path prefix where unload wrote files","Check Azure storage credentials/permissions allow writing and listing blobs","Confirm the unload step succeeded and blobs exist (portal/az cli list)","Re-run the unload and retry listing"],"exampleFix":"// before\ncontainer: 'exports', prefix: 'unload/' // wrong prefix, 0 blobs found\n// after\ncontainer: 'exports', prefix: 'unload-out/' // matches actual unload output","handlingStrategy":"retry","validationCode":"// before extraction, ensure blobs exist\nconst listed = await blobSvc.listBlobsFlat(container, { prefix });\nif (listed.filter(b => b.name.endsWith('.csv')).length === 0) throw new Error('unload wrote no CSVs to ' + container);","typeGuard":null,"tryCatchPattern":"try {\n  urls = await extractFilesFromAzure(...);\n} catch (e) {\n  if (/No CSV files were obtained/.test(e.message)) {\n    await sleep(2000);\n    return extractFilesFromAzure(...); // retry once after unload settles\n  }\n  throw e;\n}","preventionTips":["Verify container name and prefix match the unload output","Grant storage account permissions for write + list","Check blob existence right after unload before extraction","Log unload job results to distinguish 'failed unload' from 'empty listing'"],"tags":["azure","blob-storage","unload","permissions"],"backgroundTag":"unload-no-csv-files","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}