Forum Stats

  • 3,770,440 Users
  • 2,253,113 Discussions
  • 7,875,456 Comments

Discussions

(Apex Live Labs) Remote Data Source Lab - Lab 2 Step 4 Error

User_381Y7
User_381Y7 Member Posts: 5 Green Ribbon

Thank you for the tutorial!

I think when the the code was copied to the instructions the "_" character for some reason did not copy.

Here is what I believe the code should be:

-- Remove big_mac_index;

delete big_mac_index;


-- Load data from The Economist (csv) REST API 

insert into big_mac_index 

(country_name, country_iso, currency_code, local_price, dollar_exchange_rate, gdp_dollar, entry_date) 

select col001, col002, col003, col004, col005, col006, to_date(col007,'YYYY-MM-DD') 

from table(apex_data_parser.parse 

   ( p_content => apex_web_service.make_rest_request_b 

     ('https://raw.githubusercontent.com/TheEconomist/big-mac-data/master/source-data/big-mac-source-data.csv', 'GET') 

     , p_file_name => 'big-mac-source-data.csv' 

     , p_skip_rows => 1 

   ) 

);

-- Delete bad data (rows with no price) 

delete big_mac_index 

where local_price = 0; 

Tagged: