N
N
nurzhannogerbek2019-04-29 16:59:19
Scala
nurzhannogerbek, 2019-04-29 16:59:19

How to add data to an existing csv file?

Hello comrades! Please help me figure it out.
There is a CSV file with data on the SFTP server . The file itself has 4 columns. Is it possible using Scala (Spark) to add additional data to this CSV file at the beginning of the file? For example:

| REQUEST_DATE | 2019-02-05 20:00:00 |
| USER         | Kate                |
| SEARCH_TYPE  | Global              |

| NAME         | START_DATE          | END_DATE            | STATUS |
| Alex         | 2018-01-01 00:00:00 | 2018-02-01 00:00:00 | OUT    |
| Bob          | 2018-02-01 00:00:00 | 2018-02-05 00:00:00 | IN     |
| Mark         | 2018-02-01 00:00:00 | 2018-03-01 00:00:00 | IN     |
| Mark         | 2018-05-01 00:00:00 | 2018-08-01 00:00:00 | OUT    |
| Meggy        | 2018-02-01 00:00:00 | 2018-02-01 00:00:00 | OUT    |

I will be grateful for any help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question