Skip to main content

My httpcaller results in a response body that is made up like a csv:

 

lat,long,time

a,b,c

a,b,c

a,b,c

 

I want the response body to be in seperate columns (lat, long etc..). I tried attributesplitter (both with , and carriage return as delimter)> listexploder > atributrenamer (attr_@Value(_element_index)). But I can not get it to work (it just makes a new column attr_@Value(_element_index)).

 

 

You just can use an AttributeCreator and select the list element, like _list{0},_list{1},_list{2}.

AttributeCreator Parameters

The biggest tip is to add an Inspector after your last step zo you can see where to look for. Just select a feature and check the Feature Information window.

InspectorDetail


You just can use an AttributeCreator and select the list element, like _list{0},_list{1},_list{2}.

AttributeCreator Parameters

The biggest tip is to add an Inspector after your last step zo you can see where to look for. Just select a feature and check the Feature Information window.

InspectorDetail

listSomehow that does not work for me, I get:

newattr1 newatrr2

lat , long, time a,b,c

 

That is when I use carriage return as delimeter. When I use , as delimeter I get a unique list() for every single value so that doesn't work either

 

 

 


Please provide a sample of your actual response body. I believe it's a multiline attribute.

Try writing the response to a csv file and use the FeatureReader to get your data back in the workspace. If your data has a header you can use the attribute names in that header as Attributes to Expose on the <Generic> Port in your FeatureReader.

You can add a TempPathnameCreator in front of the HttpCaller so the csv file get's deleted upon completion.


Please provide a sample of your actual response body. I believe it's a multiline attribute.

Try writing the response to a csv file and use the FeatureReader to get your data back in the workspace. If your data has a header you can use the attribute names in that header as Attributes to Expose on the <Generic> Port in your FeatureReader.

You can add a TempPathnameCreator in front of the HttpCaller so the csv file get's deleted upon completion.

I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

If you use a FeatureWriter / FeatureReader combo it'll still be a single workspace. Granted it's not the most elegant solution but I agree with @caracadrian​ that it's probably the only option for now.

If you can share that response body as text rather than a screenshot we may be able to find another way to work around this. AttributeSplitter using carriage return first and then a second time using the , comes to mind.


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

By the method I described you can have a "one click" workspace.

By using the TempPathnameCreator in front of the HttpCaller, and setting HttpCallet to Save Response Body to File, Create a New File Per Feature -> Yes, Output Folder -> _pathname (attribute from the TempPathnameCreator), seting FeatureReader to Dataset -> _response_file_path (attribute from HttpCaller), <Generic>Port -> axis:latitude / axis:longitude /... you can get the features directly with the attributes you desire


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

This is the response body:

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

 


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

Thank you! But I am still amazed that I would have to take those steps.


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

The fact the HTTP response is CSV is making it more difficult in this case, XML or JSON would make it a lot easier.

If the request is a simple URL you may be able to just paste that URL in the source file box of a CSV reader (if there's authentication and stuff being done it probably won't work, unless you can add a token to the URL). That would also avoid the attribute splitting alltogether.


I can write it as a csv and read it again no problem. The problem is that I want the whole workbench to be one-click so I can schedule it without having to save a file in between. Besides this is not the first time I a running into this.

 

response_body

in text:

 

axis:latitude,axis:longitude,axis:time,data:Analysis_Data__sm_profile_analysis,data:Analysis_Data__sm_profile_analysis_ensstd,data:Analysis_Data__sm_rootzone_analysis,data:Analysis_Data__sm_rootzone_analysis_ensstd,data:Analysis_Data__sm_surface_analysis,data:Analysis_Data__sm_surface_analysis_ensstd,data:Analysis_Data__soil_temp_layer1_analysis,data:Analysis_Data__soil_temp_layer1_analysis_ensstd,data:Analysis_Data__surface_temp_analysis,data:Analysis_Data__surface_temp_analysis_ensstd,data:Forecast_Data__sm_profile_forecast,data:Forecast_Data__sm_rootzone_forecast,data:Forecast_Data__sm_surface_forecast,data:Forecast_Data__soil_temp_layer1_forecast,data:Forecast_Data__surface_temp_forecast,data:Forecast_Data__tb_h_forecast,data:Forecast_Data__tb_h_forecast_ensstd,data:Forecast_Data__tb_v_forecast,data:Forecast_Data__tb_v_forecast_ensstd,data:Observations_Data__tb_h_obs,data:Observations_Data__tb_h_obs_assim,data:Observations_Data__tb_h_obs_errstd,data:Observations_Data__tb_h_obs_time_sec,data:Observations_Data__tb_h_orbit_flag,data:Observations_Data__tb_h_resolution_flag,data:Observations_Data__tb_v_obs,data:Observations_Data__tb_v_obs_assim,data:Observations_Data__tb_v_obs_errstd,data:Observations_Data__tb_v_obs_time_sec,data:Observations_Data__tb_v_orbit_flag,data:Observations_Data__tb_v_resolution_flag,data:cell_column,data:cell_row

44.15776824951172,-104.51763916015625,"2020-06-23T23:58:55",0.24140433967113495,0.012575740925967693,0.2483765035867691,0.013659168966114521,0.11551471799612045,0.019027482718229294,297.3000183105469,0.9555330872535706,301.1864929199219,1.1795356273651123,0.24209845066070557,0.2493024319410324,0.12898384034633636,296.8999328613281,300.8611145019531,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,808.0,245.0

44.15776824951172,-104.42427825927734,"2020-06-23T23:58:55",0.1767496019601822,0.009095101617276669,0.1818283349275589,0.009850835427641869,0.07577502727508545,0.01385344285517931,295.8811950683594,0.7661308646202087,299.606689453125,0.9440891742706299,0.17715446650981903,0.1823684126138687,0.08244185894727707,295.6227111816406,299.3885498046875,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,809.0,245.0

44.15776824951172,-104.33091735839844,"2020-06-23T23:58:55",0.17419791221618652,0.007666847202926874,0.17883171141147614,0.008307178504765034,0.06947547942399979,0.011904611252248287,294.858642578125,0.6876235008239746,298.53839111328125,0.9207746982574463,0.1745859533548355,0.17935095727443695,0.07568531483411789,294.6627197265625,298.3641052246094,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,810.0,245.0

44.15776824951172,-104.23755645751953,"2020-06-23T23:58:55",0.17362123727798462,0.01054029818624258,0.15977726876735687,0.009112892672419548,0.08134635537862778,0.01926041953265667,293.8444519042969,0.675663948059082,297.242919921875,0.8660253882408142,0.17384956777095795,0.16012121737003326,0.08625710755586624,293.6593933105469,297.0748596191406,268.3493347167969,2.2372829914093018,282.1311950683594,1.9039433002471924,267.874755859375,274.24310302734375,4.0,6.46231292632128E8,1.0,1.0,283.8533630371094,283.6559753417969,4.0,6.46231292632128E8,1.0,1.0,811.0,245.0

It is not a simple URL linky besides: It contains dates and I want to automaticaslly modify those dates using the datetimestamper and I think the input url for the csvreader is static?


If it's not a simple url, you can create it in the FeatureReader, than expose what attributes you need.


dynaWrite_Read@michiedem​ 

 

Using your csv sample. (which i copied and pasted in an attribute in the creator)

(one of the possibe solutions)

 

1 attributesplitter: name lof list "text_line_data"

2 listexploder

3 write using a Featureriter to a txt file. Name the file YourName.csv.

4 A featureReader (on the summary output port of the feaurewriter) and read the csv file wit comma seperator. U can enter the name u used inthe FeatureWriter, even if the file does not exist yet)

First time u run it, all attributes are of course hidden. U can see them in the FeatureInformationWIndow)

 

5 If u click again in the FeatureReader parameters after 1st run, the attributes become non hidden. (so it is not one click because of dynamically created attributes)

 

 

 

 


listSomehow that does not work for me, I get:

newattr1 newatrr2

lat , long, time a,b,c

 

That is when I use carriage return as delimeter. When I use , as delimeter I get a unique list() for every single value so that doesn't work either

 

 

 

So, I've tried it with some success (the method is below) but it might not be working because of hidden characters in the data. 

 

So I would look at the response attribute in the FME inspector (or Visual Preview) by double-clicking the value to open it in a text window. That should have an option at the bottom to check for hidden characters:

 

inspectAttrCharts

 

 

If the result reveals no hidden characters, then the following should work, starting with:

lat,long,time
a,b,c
a,b,c
a,b,c

...then an AttributeSplitter (split on carriage return) would give you:

list{0} = lat,long,time
list{1} = a,b,c
list{2} = a,b,c
list{3} = a,b,c

Then a ListExploder gives you four features:

Feature 1: list = lat,long,time
Feature 2: list = a,b,c
Feature 3: list = a,b,c
Feature 4: list = a,b,c

Another AttributeSplitter (split on ,) gives you:

Feature 1: 
list{0} = lat
list{1} = long
list{2} = time
 
Feature 2: 
list{0} = a
list{1} = b
list{2} = c
 
Feature 3: 
list{0} = a
list{1} = b
list{2} = c
 
Feature 4: 
list{0} = a
list{1} = b
list{2} = c

And now you can use the AttributeCreator (or Renamer) to convert list{0} to lat, etc

 

If there are other parts to the response - as there seems to be - then you'd need to filter them out (probably a Tester after the ListExploder). 

 

As others have said, there are XML and JSON transformers because we expect that format of data to appear mid-translation. CSV not so much. So writing/re-reading a file - as odd as it sounds - is probably the best method. 


@michiedem​ 

 

Here is picture of output.

dynaWrite_Read_output


@michiedem​ 

 

 


@michiedem​ 

 

 

Hello gio: Thank you! after all the responses including yours i got it to work using the featurereader.


Reply