Support Forums
Format header row unload file

Hello,
I m trying to configure my own "CSV" format file. As far as I know, the predefined CSV format in DT is fixed, so that I cant for example remove the TZ column, or include a column with the JOB name... and so on. Thus, I have thought to use free format mode, and format data like a CSV (, separated values) and then upload to the FTP server with *.csv extension. However, using free format mode (I think) doesnt allow to edit the header row so you get the data like this:

StationID,23/06/2003,15:31:,15,162.2
StationID,23/06/2003,15:31:30,161.2
StationID,23/06/2003,15:31:45,159.8

While I am trying to get a file like this:

ID,Date,Time,Temperature(ºC)
StationID,23/06/2003,15:31:15,162.2
StationID,23/06/2003,15:31:30,161.2
StationID,23/06/2003,15:31:45,159.8

Could you please tell me if this is possible to archive? In that case, how? Thank you very much in advance.

Hello, I m trying to configure my own "CSV" format file. As far as I know, the predefined CSV format in DT is fixed, so that I cant for example remove the TZ column, or include a column with the JOB name... and so on. Thus, I have thought to use free format mode, and format data like a CSV (, separated values) and then upload to the FTP server with *.csv extension. However, using free format mode (I think) doesnt allow to edit the header row so you get the data like this: StationID,23/06/2003,15:31:,15,162.2 StationID,23/06/2003,15:31:30,161.2 StationID,23/06/2003,15:31:45,159.8 While I am trying to get a file like this: ID,Date,Time,Temperature(ºC) StationID,23/06/2003,15:31:15,162.2 StationID,23/06/2003,15:31:30,161.2 StationID,23/06/2003,15:31:45,159.8 Could you please tell me if this is possible to archive? In that case, how? Thank you very much in advance.

Hi Contek,

That is possible but with limitation, you can only get the header when downloading the newest data.
The header must be created manually at the same interval to your reading schedule and it must use schedule A:

RA(ALARMS:1R:W100)1M
DO1"ID,Date,Time,Temperature(ºC)^M^J"

RB1M
....

1R means you only let 1 record to be saved in the memory, W100 means the header has a maximum length of 100 characters (you can adjust this yourself).
Then to unload the result:

DO{COPYD data=y alarms=y sch=AB dest=ftp://....}

Best regards,
Rudy Gunawan

Hi Contek, That is possible but with limitation, you can only get the header when downloading the newest data. The header must be created manually at the same interval to your reading schedule and it must use schedule A: RA(ALARMS:1R:W100)1M DO1"ID,Date,Time,Temperature(ºC)^M^J" RB1M .... 1R means you only let 1 record to be saved in the memory, W100 means the header has a maximum length of 100 characters (you can adjust this yourself). Then to unload the result: DO{COPYD data=y alarms=y sch=AB dest=ftp://....} Best regards, Rudy Gunawan

Hello again,

Thank you for answering. What I am exactly trying to do is to output daily data (that is, 10 mins measures sent each 24h) to a FTP server. The output file (lets say myFile.csv) must be a CSV like file, with my own header, and the data appended each day. Is there any way to append data? I thought it was possible, however it is creating a new file each day the data is sent to the FTP server. Any workaround?

Best regards!

Hello again, Thank you for answering. What I am exactly trying to do is to output daily data (that is, 10 mins measures sent each 24h) to a FTP server. The output file (lets say myFile.csv) must be a CSV like file, with my own header, and the data appended each day. Is there any way to append data? I thought it was possible, however it is creating a new file each day the data is sent to the FTP server. Any workaround? Best regards!

Hi Contek,

Unfortunately we do not use append feature for FTP transfer. It will create a new file everyday.
You may choose to send the whole data to keep into a single file, however the file will getting bigger and bigger over time.
Assuming you have 5 parameters with 10 minutes reading interval, the file size would be:

  • Day 1: 15K
  • Day 2: 30K
  • Day 30: 441K

Best regards,
Rudy Gunawan

Hi Contek, Unfortunately we do not use append feature for FTP transfer. It will create a new file everyday. You may choose to send the whole data to keep into a single file, however the file will getting bigger and bigger over time. Assuming you have 5 parameters with 10 minutes reading interval, the file size would be: - Day 1: 15K - Day 2: 30K - Day 30: 441K Best regards, Rudy Gunawan

Thank you Rudy, we were wrong planning the way the system would digest the data. Now we send independent files and the supervisor system reads, integrates and deletes each file we send, so appending had no sense here.
Best regards.

Thank you Rudy, we were wrong planning the way the system would digest the data. Now we send independent files and the supervisor system reads, integrates and deletes each file we send, so appending had no sense here. Best regards.
33
4
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft