Skip to content

Commit

Permalink
add new finance table that maps from the csv downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
spullara committed May 15, 2009
1 parent c47cee1 commit 41e469a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
18 changes: 18 additions & 0 deletions alltables.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
use 'http://www.datatables.org/.idea/copyright/profiles_settings.xml' as profiles_settings;
use 'http://www.datatables.org/.idea/inspectionProfiles/profiles_settings.xml' as profiles_settings;
use 'http://www.datatables.org/.idea/inspectionProfiles/Project_Default.xml' as Project_Default;
use 'http://www.datatables.org/.idea/compiler.xml' as compiler;
use 'http://www.datatables.org/.idea/dataSources.xml' as dataSources;
use 'http://www.datatables.org/.idea/dynamic.xml' as dynamic;
use 'http://www.datatables.org/.idea/encodings.xml' as encodings;
use 'http://www.datatables.org/.idea/excludeFromValidation.xml' as excludeFromValidation;
use 'http://www.datatables.org/.idea/misc.xml' as misc;
use 'http://www.datatables.org/.idea/modules.xml' as modules;
use 'http://www.datatables.org/.idea/projectCodeStyle.xml' as projectCodeStyle;
use 'http://www.datatables.org/.idea/scala_compiler.xml' as scala_compiler;
use 'http://www.datatables.org/.idea/sqldialects.xml' as sqldialects;
use 'http://www.datatables.org/.idea/templateLanguages.xml' as templateLanguages;
use 'http://www.datatables.org/.idea/validation.xml' as validation;
use 'http://www.datatables.org/.idea/vcs.xml' as vcs;
use 'http://www.datatables.org/.idea/workspace.xml' as workspace;
use 'http://www.datatables.org/amazon/amazon.ecs.xml' as amazon.ecs;
use 'http://www.datatables.org/bitly/bit.ly.shorten.xml' as bit.ly.shorten;
use 'http://www.datatables.org/data/data.html.cssselect.xml' as data.html.cssselect;
Expand Down Expand Up @@ -85,6 +102,7 @@ use 'http://www.datatables.org/weather/weather.search.xml' as weather.search;
use 'http://www.datatables.org/wesabe/wesabe.tags.xml' as wesabe.tags;
use 'http://www.datatables.org/whitepages/whitepages.reverse.xml' as whitepages.reverse;
use 'http://www.datatables.org/whitepages/whitepages.search.xml' as whitepages.search;
use 'http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml' as yahoo.finance.quotes;
use 'http://www.datatables.org/yahoo/messenger/yahoo.messenger.status.xml' as yahoo.messenger.status;
use 'http://www.datatables.org/yahoo/search/yahoo.search.suggestions.xml' as yahoo.search.suggestions;
use 'http://www.datatables.org/yahoo/siteexplorer/yahoo.siteexplorer.inlinks.xml' as yahoo.siteexplorer.inlinks;
Expand Down
9 changes: 7 additions & 2 deletions yahoo/finance/yahoo.finance.quotes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<sampleQuery>select * from {table} where symbol='yhoo';</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<select itemPath="symbols.symbol" produces="XML">
<urls>
<url>http://finance.yahoo.com</url>
</urls>
Expand All @@ -15,7 +15,12 @@
var query = "select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=" + symbol +
"&f=aa2bb2b3b4cc1c3c6c8dd1d2ee1e7e8e9ghjkg1g3g4g5g6ii5j1j3j4j5j6k1k2k4k5ll1l2l3mm2m3m4m5m6m7m8nn4opp1p2p5p6qrr1r2r5r6r7ss1s7t1t7t8vv1v7ww1w4xy' " +
"and columns='Ask,AverageDailyVolume,Bid,AskRealtime,BidRealtime,BookValue,Change&PercentChange,Change,Commission,ChangeRealtime,AfterHoursChangeRealtime,DividendShare,LastTradeDate,TradeDate,EarningsShare,ErrorIndicationreturnedforsymbolchangedinvalid,EPSEstimateCurrentYear,EPSEstimateNextYear,EPSEstimateNextQuarter,DaysLow,DaysHigh,YearLow,YearHigh,HoldingsGainPercent,AnnualizedGain,HoldingsGain,HoldingsGainPercentRealtime,HoldingsGainRealtime,MoreInfo,OrderBookRealtime,MarketCapitalization,MarketCapRealtime,EBITDA,ChangeFromYearLow,PercentChangeFromYearLow,LastTradeRealtimeWithTime,ChangePercentRealtime,ChangeFromYearHigh,PercebtChangeFromYearHigh,LastTradeWithTime,LastTradePriceOnly,HighLimit,LowLimit,DaysRange,DaysRangeRealtime,FiftydayMovingAverage,TwoHundreddayMovingAverage,ChangeFromTwoHundreddayMovingAverage,PercentChangeFromTwoHundreddayMovingAverage,ChangeFromFiftydayMovingAverage,PercentChangeFromFiftydayMovingAverage,Name,Notes,Open,PreviousClose,PricePaid,ChangeinPercent,PriceSales,PriceBook,ExDividendDate,PERatio,DividendPayDate,PERatioRealtime,PEGRatio,PriceEPSEstimateCurrentYear,PriceEPSEstimateNextYear,Symbol,SharesOwned,ShortRatio,LastTradeTime,TickerTrend,OneyrTargetPrice,Volume,HoldingsValue,HoldingsValueRealtime,YearRange,DaysValueChange,DaysValueChangeRealtime,StockExchange,DividendYield'";
response.object = y.query(query).results;
var rows = y.query(query).results.row;
var symbols = <symbols></symbols>;
for each (var row in rows) {
symbols.symbol += <symbol name={row.Symbol.text().toString().replace(/"/g, "")}>{row.*}</symbol>;
}
response.object = symbols;
]]></execute>
</select>
</bindings>
Expand Down

0 comments on commit 41e469a

Please sign in to comment.