public function save($data, Sheet $sheet)
 {
     $sheetConfig = $sheet->getConfig();
     $tmpFilename = $this->writeRawCsv($data, $sheet);
     $dataProcessor = new DataProcessor($tmpFilename, $sheetConfig);
     $outFilename = $dataProcessor->process();
     $this->configuration->initDataBucket($sheetConfig['db']['table']);
     $outputTable = $sheetConfig['db']['table'];
     $tableNameArr = explode('.', $outputTable);
     if (count($tableNameArr) != 3) {
         throw new UserException(sprintf("Error in configuration. Wrong tableId format '%s'", $outputTable));
     }
     $table = new Table($this->configuration->getStorageApi(), $outputTable, $outFilename);
     try {
         $table->save(true);
     } catch (ClientException $e) {
         throw new UserException($e->getMessage(), $e, ['outputTable' => $outputTable, 'sheet' => $sheet->toArray()]);
     }
     unlink($tmpFilename);
 }