Skip to content

Commit 2ff24f3

Browse files
jirkasemmlerclaude
authored andcommitted
feat: add gzip option for workspace table export
Add optional `gzip` boolean parameter to the workspace table export endpoint. When true, the driver exports data as gzip-compressed and the file path reflects the .gz extension. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b6af22a commit 2ff24f3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Keboola/StorageApi/Client.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,7 @@ public function exportTableAsync($tableId, $options = [])
17311731
* Export a table from workspace to file storage
17321732
*
17331733
* @param string|null $fileType Optional format (csv or parquet), defaults to csv
1734+
* @param bool|null $gzip Whether to gzip the exported file
17341735
* @return array{
17351736
* file: array{
17361737
* id: int
@@ -1742,6 +1743,7 @@ public function exportWorkspaceTable(
17421743
string $tableName,
17431744
string $fileName,
17441745
?string $fileType = null,
1746+
?bool $gzip = null,
17451747
): array {
17461748
$params = [
17471749
'tableName' => $tableName,
@@ -1752,6 +1754,10 @@ public function exportWorkspaceTable(
17521754
$params['fileType'] = $fileType;
17531755
}
17541756

1757+
if ($gzip !== null) {
1758+
$params['gzip'] = $gzip;
1759+
}
1760+
17551761
return $this->apiPostJson("workspaces/{$workspaceId}/table-export", $params);
17561762
}
17571763

0 commit comments

Comments
 (0)