Skip to main content
  • 3,386 Posts
  • 13,845 Replies
3386 Posts
How do I use a JSON element as attribute value?

I have a JSON file, structured like this:{  "W-Number": {    "EP1": [      {        "timestamp": 1407859200000,        "value": 1.35      },      {        "timestamp": 1407862800000,        "value": 1.44      }    ],    "EP2": [      {        "timestamp": 1407859200000,        "value": 1.58      },      {        "timestamp": 1407862800000,        "value": 1.63      }    ]  }}I want to turn it into a table, like thisW-Number | timestamp | valueEP1 | 1407859200000 | 1.35EP1 | 1407862800000 | 1.44EP2 | 1407859200000 | 1.58EP2 | 1407862800000 | 1.63What I managed so far: used JSONFlattener, then AttributeExposer to expose (see below*). Then I used a ListExploder; it works when I specify e.g. W-Number-EP1{}, which gives me a table for the timestamp and value of EP1, h

Programatically detecting the errors in the input file during the conversion

We are converting files from KML/KMZ format to MapInfo in a batch operation. We have our C# program calling the FME as a console application with parameters, for every file. Everything works fine except sometimes the the KML input file has errors in it and the FME convertor exists with an error I can see in the console screen.Is any way I can programmatically detect when the convertor has problems and skip the file from my side of the code? Is any message send back to the console in case of success or fail? It should be a correct way to get the result since I can see it in the console, i am just looking for the supported way.Below is an example how we call the FME workflow:string inputPath2 = "C:\\Users\\Breazuo\\Documents\\FME\\Workspaces\\ogckml2mapinfo.fmw" +                    " --SourceDataset_OGCKML " + "\"" + path + "\"" +                    " --DestDataset_MAPINFO " + "\"" + FMEOutputDirectory + "\""; System.Diagnostics.P

Excel Writer: Failed to save changes to the spreadsheet

first sorry if the question is not in the right place I have a problem with Excel Writer inconsistently showing the Error:Excel Writer: Failed to save changes to the spreadsheet 'file name'. Check that you have write permission to the file, it has no password protection and is not opened by another application. Error message is 'bad allocation'A fatal error has occurred. Check the logfile above for details... Last line repeated 2 times ...sometime it doesn't show at all and other times for the some unchanged WB it appears and I only restart my machine and it would work fine but other times it wouldn't unless I manually run the WB till the Excel Writer and run the Writer alone and it will be fine I thought that the problem was only appearing when I use the same writer to write multiple Sheets and tried to have them be separate (multiple Writer one for each sheet but all writing to same file) but it appeared again in a wr

Badge Winners

Show all badges

Community Stats

32,397
Posts
123,141
Replies
40,505
Members