Skip to main content

I am new to Json queries. I am trying to extract the details from a arcgis feature service as a spreadsheet for the ESRI living atlas requirements. I have gotten really close but I want my features and tables to be in their own column (second screenshot is what I want). What I am getting is the feature layer AFTER its attributes, and in the same column.

 

I am hoping the resulting table can go into the corresponding feature layers metadata page, as they are manually updated at the moment.

 

There is probably a way to do this using substring extractor, but I was hoping I could do it using json as I have to replicate this for 10 more data products.

 

jsonjson3 

json2

I think you are doing a lot in just your reader which makes it difficult to troubleshoot. However I think the problem is that there are multiple instances of name in your JSON. I.e your first and second column are combined because both are values for the attribute called name. I edited your workbench to instead use a http caller and some JSON fragmenters which are way easier to troubleshoot. Now if you take a look at my JSONFragmenter_2 you will see I have exposed the name attribute. Now if you turn on feature caching and inspect the features in this transformer you will see 16 features with the "reference table for...." value. However if you take a look at the next JSON fragmenter (number 4 ) you will suddenly see that the values in the name column are different! This is because the tables JSON object has a "name" but the table fields also have their own "name".

 

Because of this you need to put an attribute renamer in between the fragmenter_2 and 3. (also you need to expose which attributes you want to use in your excel)


I think you are doing a lot in just your reader which makes it difficult to troubleshoot. However I think the problem is that there are multiple instances of name in your JSON. I.e your first and second column are combined because both are values for the attribute called name. I edited your workbench to instead use a http caller and some JSON fragmenters which are way easier to troubleshoot. Now if you take a look at my JSONFragmenter_2 you will see I have exposed the name attribute. Now if you turn on feature caching and inspect the features in this transformer you will see 16 features with the "reference table for...." value. However if you take a look at the next JSON fragmenter (number 4 ) you will suddenly see that the values in the name column are different! This is because the tables JSON object has a "name" but the table fields also have their own "name".

 

Because of this you need to put an attribute renamer in between the fragmenter_2 and 3. (also you need to expose which attributes you want to use in your excel)

thank you


Reply