Extension talk:External Data/Archive 2017 to 2018

JSON issue
Hi - I'm having an issue with json data. I'm using External Data v1.3.5. Mediawiki version is 1.16.2

--Skenaja 21:40, 30 January 2012 (UTC)
 * Json:
 * My SMW page:
 * The "tags" array in the json doesn't seem to be parsed...


 * Hi - my guess is that the issue is the double brackets around the "tags" value, which I think makes it an array of an array. Why are there two brackets there - do you know? Yaron Koren 13:14, 31 January 2012 (UTC)
 * I'm not too sure, I've raised it with that site's developers. The json does parse OK @ JSLint.--Skenaja 16:54, 31 January 2012 (UTC)


 * Actually, the brackets might not be the issue - the problem might just be External Data's parsing of arrays in JSON. Someone just sent me a patch, I think coincidentally, that might fix this very issue. Hopefully I can add it in sometime in the next few days. Yaron Koren 17:05, 31 January 2012 (UTC)


 * I've had it confirmed to me that the double brackets are indeed arrays of arrays - here's another sample json file which shows it better: --Skenaja 22:56, 31 January 2012 (UTC)

Get data from Sqlite Db
Hi,

I would like to know if it's possible to retrieve data from sqlite db ? I've tested a few conbinations in Localsettings but not luck... I use Mediawiki 1.16.5.

Thanks in adavnce. Vincent.


 * There was no support for SQLite, for some reason - I don't know why I never added it in. I just added it now, I think, along with support for DB2, which was also missing. If you use SVN, you should re-get the code - if not, you can just duplicate this change in your code. Then, you should be able to set "sqlite" as the DB server type. Please let me know if that worked... Yaron Koren 14:36, 31 January 2012 (UTC)


 * Thanks for the fast reply, I'll give you feedback shortly.
 * Vincent.
 * Could you tell if my Localsettings.php is good ?

$edgDBServer['SQLITE'] = "/mnt/sqlite/infos_db"; ==> folder of sqlite db $edgDBServerType['SQLITE'] = "sqlite"; $edgDBName['SQLITE'] = "infos_db"; $edgDBUser['SQLITE'] = ""; $edgDBPass['SQLITE'] = "";
 * Error: ( SQLite database not accessible)
 * Thanks in advance


 * I assume you're setting the username and password in the original - beyond that, I don't know. I'm used to the DB server being a name or a URL of some sort, and not a directory, but I don't know how SQLite works. Yaron Koren 15:45, 31 January 2012 (UTC)


 * HI, After a few search around compatibility between php and sqlite. It seems that sqlite version i use (sqlite3) uses PDO function (PHP) to connect to that db. Connection and query syntax seem to be different from ED_Utils.php code. I'm not skilled enough to review ED_Utils.php code.
 * Thanks for the help. Great job, i use it for Mysql access without any problem. Vincent
 * Hi, I'm gone through sqlite connection. it works great. For information you have to :
 * Add $wgSQLiteDataDir = "/root/forlder/of/sqlite"; in your Localsettings.php
 * Vérify you have RW rights on sqlite db.

$edgDBServer['SQLITE'] = ""; ==> Not used $edgDBServerType['SQLITE'] = "sqlite"; $edgDBName['SQLITE'] = "infos_db"; ==> Name of sqlite db without extension (Be sure to have .sqlite extension because DatabaseSsqlite.php script will add it automatically) $edgDBUser['SQLITE'] = ""; ==> Not used $edgDBPass['SQLITE'] = ""; ==> Not used
 * Thanks Yaron, it also works great for Oracle Database (10G R2). Vincent G

Thanks for letting me know about that, and for diagnosing the issue. I just checked in some code that I think handles this issue in a nicer way - you can see the new documentation for how to run it. If you get the new code and try it out, please let me know if it works for you. Yaron Koren 20:26, 3 February 2012 (UTC)

Issue
I am trying to get CSV data from a page in the same wiki. I have duplicated the example from: http://discoursedb.org/wiki/Fruits_table

I have tried both the explicit URL and the fullurl and various combinations of raw data and Special:GetData in the URL. No matter what, the tables are blank. When I follow the links, the following test appears in the browser window: Name,Color,Shape Apple,Red,Round Banana,Yellow,Oblong Orange,Orange,Round Pear,Yellow,"Pear-shaped"

The tables are completed when I pull directly from the example external URL: http://discoursedb.org/wiki/Special:GetData/Fruits_data

I am must be doing something bone-headed, but can't see my error. Did I miss some setting? Here is the abbreviated content of my Fruits table page:

Thanks in advance, Rodger

From my local wiki using explicit URL (Fails)
Using: https://10.34.161.20/index.php?title=Special:GetData/Fruits_data&action=raw

From my local Wiki using fullrul (Fails)
Using fullurl:

From external Wiki (Works)
Using http://discoursedb.org/wiki/Special:GetData/Fruits_data

I have tried on a couple of my wiki VMs with the same result., including updated version, but same behavior regardless. Seems like it wouldn't work for the external URL if there was a version conflict.

MediaWiki	1.18.1, Semantic Bundle, ..External Data (Version 1.3.5), ...

Discussion

 * Hi - that's quite a bit more information than was necessary. :) But I admire your thoroughness. Anyway, I assume the issue is that the server, strange as it may sound, can't access itself. It's trying to reach its data via the IP address, and that one, I assume, is closed off. You'll need to modify something for the server to be able to access itself via HTTP. Yaron Koren 04:36, 15 February 2012 (UTC)
 * That makes sense. Thanks for the quick response! Rodger
 * I don't think I can overcome the server access. I don't have the expertise to suggest a change to the admins, and don't know if would be feasible. Is there a way that something like the following could be made to work?

#get_web_data:url= or #get_web_data:url=
 * Or a parallel #get_local_data? I am familiar with the internal objects, but would really like to use CVS or XML when I have it, rather than translate to internal object syntax.


 * I can't think of a way to do that, unfortunately... though, what about using "localhost" instead of the IP address? That might work. Yaron Koren (talk) 02:50, 17 February 2012 (UTC)

get_db_data Parsing
This is related to the discussion from about a year ago: http://www.mediawiki.org/wiki/Extension_talk:External_Data/Archive_2011#get_db_data_-_Data_parsing

This data retrieval DOES NOT work when the field with a convert is in the 2nd position

This data retrieval DOES work when the field with a convert is in the 1st position

--Wolcott 20:10, 16 February 2012 (UTC)

Have table display results horizontally rather than vertically
I have this query against the MySQL db that goes something like this:

From that I am able to pull in the results into a table like so:

And it displays the results just fine. However, I was wondering if there is a simple way that I am missing where you could have the extension display the results horizontally instead of vertically.

So instead of seeing a list of names like this:

I want it to look like this:

--Stanimalz (talk) 16:04, 22 February 2012 (UTC)


 * Hi - I would try removing the "|-" line under the #for_external_table line. Yaron Koren (talk) 16:08, 22 February 2012 (UTC)


 * That worked perfectly. Thanks for the quick response.--Stanimalz (talk) 17:47, 22 February 2012 (UTC)

Oracle usage
Hi,

can somebody tell me how to get the extension working with oracle? I can't figure out which settings i have to set.

And how does the Localsettings.php look like if i use the extension to connect an Oracle DB.

My Attempt:

$edgDBServer['bla'] = "blabla.bla.de"; $edgDBServerType['bla'] = "oracle"; $edgDBName['bla'] = "bladb"; $edgDBUser['bla'] = "blauser"; $edgDBPass['bla'] = "blapw";

And my Query looks like:


 * This should probably be more obvious in the documentation, but you should have "db=bla" instead. Yaron Koren (talk) 13:30, 13 March 2012 (UTC)


 * If i type in "db=bla" i receive the following error in my wiki:


 * Database error
 * A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
 * ALTER SESSION SET CURRENT_SCHEMA=BLA
 * from within function "DatabaseOracle::selectDB". Database returned error ": ".
 * Any idea?

These is a Systable which is readable by my user.

-jan


 * This could be an error in MediaWiki's handling of Oracle, or maybe just a permission error. I would try getting some more basic data from that database, like the contents of a regular table, to see where the problem is coming from. Yaron Koren (talk) 17:29, 13 March 2012 (UTC)

Microsoft Sql-Server Error
Hi,

can somebody tell me how to get the extension working with Microsoft Sql Server and MediaWiki 1.18? I have a working MediaWiki 1.15 installation with External Data connecting to Microsoft Sql Server 2008R2

Now i want to Upgrade to MediaWiki 1.18 and all works fine, but the ExternalData Extension fires some Warnings and Ends up with an Fatal error. I don't think that it is a configuration error, because of the running MediaWiki 1.15 installation. The Messages i get:

Details of this Installation are on my UserPage, the Servertype in LocalSettings is set to mssql:

--TomyLee (talk) 06:08, 4 April 2012 (UTC)


 * Hi - if possible, could you include here the #get_db_data call you're making? Feel free to change around any table or field names, if it's private. Yaron Koren (talk) 15:15, 4 April 2012 (UTC)


 * the get_db_data i have testet are:


 * and


 * --TomyLee (talk) 05:44, 5 April 2012 (UTC)