Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
New Contributor
Posts: 2
Registered: ‎10-20-2019
Accepted Solution

EdgeFrontier read multiple files

[ Edited ]

How can I make EdgeFrontier read multiple files (e.g. CSV) instead of specifying a single file?

 

My solution is

  1. Create a file named load.csv
  2. Fetch the number of files in the current directory and assign into a variable (e.g. i)
  3. Set a dummy loop variable to true
  4. If loop variable is SetToTrue, check i value
  5. If(i > 0) then read filenames from the list of files in the current directory
  6. Insert the filenames into a variable list
  7. Extract the filenames into a series (the delimiter is | so I extracted it using the delimiter option under the Relationship Process)
  8. Get the first file to work with using SeriesField_Last or SeriesField_First and assign into a filename variable 
  9. rename the file with the same filename assigned to the filename variable TO load.csv to
    • (e.g. old name: file_20191021.csv, new name: load.csv)
  10. process the file (insert into databases)
  11. delete the file
  12. subtract 1 from i
  13. set the loop variable to true (to start with the next file)

In this example, I used 4 variables. It works, but I wonder if it will be using a lot of resources and maybe interfere other loaded systems because sometimes when I load the system with the used method, some of the other systems my colleague is working on got stuck. Robot Sad 

 

Please advise.

 

p/s: each file has about 500,000 lines

Technical Evangelist
Posts: 1,144
Registered: ‎09-11-2015

Re: EdgeFrontier read multiple files

Hi maui,

 

EdgeFrontier is a product of Hexagon Safety & Infrastructure division, please try visiting the support pages here:

https://support.hexagonsafetyinfrastructure.com/infocenter/index?page=forums&board=EXTERNAL_DISCUSSI...

 

Best Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
New Contributor
Posts: 2
Registered: ‎10-20-2019

Re: EdgeFrontier read multiple files

thank you for your information