You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/09/22 13:49:16 UTC

[incubator-streampipes] 01/02: Fix CSV export for missing columns in database

This is an automated email from the ASF dual-hosted git repository.

zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 6543820235ce1d0e4e5af9ed661135d3c1b21a28
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Tue Sep 22 13:46:05 2020 +0200

    Fix CSV export for missing columns in database
---
 .../streampipes/rest/impl/datalake/DataLakeManagementV3.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
index 8d64aa9..2d9ef8d 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeManagementV3.java
@@ -332,11 +332,15 @@ public class DataLakeManagementV3 {
                   if (!isFirstInRow) {
                     outputStream.write(toBytes(";"));
                   }
-                  isFirstInRow = false;
+                  isFirstInRow = false  ;
                   if (i1 == 0) {
                     element = ((Double) element).longValue();
                   }
-                  outputStream.write(toBytes(element.toString()));
+                  if (element == null) {
+                    outputStream.write(toBytes(""));
+                  } else {
+                    outputStream.write(toBytes(element.toString()));
+                  }
                 }
                 outputStream.write(toBytes("\n"));
               }