"Read URL (CSV)

User: "amund"
New Altair Community Member
Updated by Jocelyn

Hi,

 

I'm trying to use the Read URL-operator to get some financial data. This data is real-time, and I need to re-load it every now and then without having to manually download and edit the data. Example:

 

https://chartapi.finance.yahoo.com/instrument/1.0/AAPL/chartdata;type=quote;range=1d/csv

 

The Read URL fails because there are some lines on the top of the document (17 lines) that are only informational and not useful for the data set. I need to remove these lines.

 

Is there a way to remove or ignore these lines using RapidMiner operators?

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Thomas_Ott"
    New Altair Community Member
    Accepted Answer

    Are these streaming delayed quotes? I usually download the historical quotes with no problem. I wonder if it has to do with the data feed itself. 

     

    So this works but you'd need to rename the columns and verify that's correct.

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.5.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="7.5.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="open_file" compatibility="7.5.001" expanded="true" height="68" name="Open File" width="90" x="112" y="34">
    <parameter key="resource_type" value="URL"/>
    <parameter key="url" value="https://www.google.com/finance/getprices?q=AAPL&amp;i=300&amp;i=300&amp;p=100d&amp;f=d,c,h,l,o,v"/>
    </operator>
    <operator activated="true" class="read_csv" compatibility="7.5.001" expanded="true" height="68" name="Read CSV" width="90" x="246" y="34">
    <parameter key="csv_file" value="C:\Users\THOMAS~1\AppData\Local\Temp\rm_file_4131079488985567346.dump"/>
    <parameter key="column_separators" value="[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+"/>
    <parameter key="comment_characters" value="\"/>
    <parameter key="first_row_as_names" value="false"/>
    <list key="annotations">
    <parameter key="0" value="Comment"/>
    <parameter key="1" value="Comment"/>
    <parameter key="2" value="Comment"/>
    <parameter key="3" value="Comment"/>
    <parameter key="4" value="Comment"/>
    <parameter key="5" value="Comment"/>
    <parameter key="6" value="Comment"/>
    <parameter key="7" value="Unit"/>
    </list>
    <list key="data_set_meta_data_information">
    <parameter key="0" value="att1.true.polynominal.attribute"/>
    </list>
    </operator>
    <operator activated="true" class="split" compatibility="7.5.001" expanded="true" height="82" name="Split" width="90" x="380" y="34"/>
    <connect from_op="Open File" from_port="file" to_op="Read CSV" to_port="file"/>
    <connect from_op="Read CSV" from_port="output" to_op="Split" to_port="example set input"/>
    <connect from_op="Split" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>