import data from csv to sql

import data from csv to sql

Hello,

Some time ago, we had a zenon supervisor version 7.20 running and archiving data. The data was stored as csv files.
Later, we changed to sql evacuation.
Now, we are running 7.60 and the customer ask us to insert thee data that is in those csv.
the data in the csv is like this:

01/01/2016;0:46:00.0;B0002V.Health;0.0;SPONT

The new project is new, has his own new variables that correspond to the old ones (same IED, but diferent variable name). So i created in the new project an archive structure similar to the old one, with evacuation to sql. then, a c# program that, with the variables table from both projects, generates a csv file in the Zenon format. This file has lines like this:

62;0;1451606400;0;413712270;4325376;0;

Then i bulk insert the file in the sql table (10.000.000 records).
I did this twice. In the first one, i used the same old project with a new archive for importing, and i could view the data in a report viewer type screen.
The second one, i created a brand new project witch archive with the same configuration and inserted the data, but i can't see the data in a report viewer screen.
¿Why this happens?, ¿Perhaps Zenon needs to create some new data to access the old one?.
Aditionally, when generating the zenon format record, i use as status the string '4325376'. This has worked for me before, but i do not really knowwhat statuses to use (i saw this in the records created by a normal zenon evacuation, so i used it).
¿What is the recommended method for inserting the data from external sources in the historic sql table?, ¿There is a manual that i can read?

I hope i have explained myself, thank you in advance




This is a migrated post! Originally posted on 23.05.2018 by user redjon. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com