sdg.matiaan
2013-04-04 19:39
some examples of bulk csv file uploads that worked:
active etherpad:
advar_class,PORT,Name
104,13001,Norwood 1
sim:
advar_class,sim,cell
102,8927000000638549010,+27810312250
elster A1140:
advar_class,p3_num,p3_num0,SNUMBER,PLACE,ZONE,SITE,FULLLOAD,MNAME,CTPRIM,CTSEC,VTPRIM,VTSEC,PRIMARYM,COMDATE,PASSWD,MDID,WIRES
106,1,$eid{key2:Milling Plant;cid:138},71503586,,,,500,Milling Plant,500,5,1,1,Y,2012-11-21,FEDC0003,001,4
meter account:
advar_class,p6_num,p6_num0,p7_num,p7_num0,CNAME,ANUMBER,S0_portion,deftar,NMD0,START0
109,1,$eid{key1:61105001;cid:106},1,$eid{key2:Tshwane Business;cid:111},Norwood Shop 1,,+1.0,3,n.a.,2011-06-01
meter account linked to 2 tariffs:
advar_class,p6_num,p6_num0,p7_num,p7_num0,p7_num1,CNAME,ANUMBER,S0_portion,deftar,NMD0,NMD1,START0,START1
109,1,$eid{key1:55090106;cid:173},2,73,88,JWIK PROPERTY DEVELOPMENT 1,,+1.0,5,n.a.,n.a.,2012-10-17,2012-10-17
SL7000:
advar_class,p37_num,p37_num0,SNUMBER,PLACE,ZONE,SITE,FULLLOAD,MNAME,CTPRIM,CTSEC,VTPRIM,VTSEC,PRIMARYM,COMDATE,WIRES,nextb
140,1,3105,31501838,a,b,c,100,test3,100,5,400,400,Y,2013-04-02,4,Y
sdg.marinusvz
2015-09-16 17:15
sdg.marinusvz
2015-09-16 17:16
sdg.marinusvz
2015-09-16 17:19
You can also use the pk1 (parent key1) or pk2 (parent key2) to specify an entity, and in case of non-unique fields, it is sometimes useful to also specify the class id of the kind of entity. The class id is a number. To see what the class id of an entity type is, refer to the web service documentation, or select the entity on the overview screen and hover over the entity type descriptor in the graphical square depicting the entity, and it should display as a tool tip, like so: 'cid: 109'
sdg.marinusvz
2015-09-16 17:25
Also note that the key1, key2 and key3 fields, and the pk1 and pk2 fields, are matched using a case insensitive 'like' clause of an sql statement. What this means, is that you can specify wild cards. For instance if you want to specify the meter account number, you can specify the column heading e.g. like so:
interfList:$eid{key2::;cid:109}
and the value in the table cell like so:
%Electricity%; AN000123 %
where AN000123 is the Account Number of the meter account entity you want to specify, and 'Electricity' is somewhere in the meter acount name. (In SQL syntax, the % is like a * in Windows file system searches)
sdg.marinusvz
2015-09-16 17:51
When you need to specify multiple items in a list, create a new column for each one, and give the heading the same name, e.g.
interfList:$eid{key2::;cid:109},interfList:$eid{key2::;cid:109},interfList:$eid{key2::;cid:109}
%Electricity%; AN000123 %,%Effluent%; AN000123 %,%Water%; AN000123 %
The above can be used pretty much like that within the greater Role bulk create csv upload file, to specify 3 entities to which the Role must have access.
sdg.marinusvz
2020-09-22 13:29
Basically, when you look at the Add dialog for any type of entity, look at the HTML form. The names of the columns should correspond to the names of the FORM variables.
All that Bulk Add does, is it takes each line, then calls the Add dialog code with the values you specified in the columns of the spreadsheet.