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

Installed Versions
I have tried on a couple of my wiki VMs with the same result. Here are the versions on one of the more recently updated, but same behavior regardless of versioning. Seems like it wouldn't work for the external URL if there was a version conflict.

MediaWiki	1.18.1 Semantic Extension
 * Semantic Bundle (Version 20120124)
 * Semantic Compound Queries (Version 0.3.1)
 * Semantic Drilldown (Version 1.1)
 * Semantic Forms (Version 2.3.2)
 * Semantic Forms Inputs (Version 0.5)
 * Semantic Internal Objects (Version 0.6.7)
 * Semantic MediaWiki (Version 1.7.0.2)
 * Semantic Result Formats (Version 1.7)
 * SemanticTasks (Version 1.4.1)

Special Pages, etc Page Schemas (Version 0.3)
 * Admin Links (Version 0.1.6)
 * CategoryTree
 * Data Transfer (Version 0.3.8)
 * Replace Text (Version 0.9.3)
 * Arrays (Version 2.0rc2)
 * CategoryTree
 * External Data (Version 1.3.5)
 * Header Tabs (Version 0.9)*
 * ParserFunctions (Version 1.4.0)
 * Validator (Version 0.4.13


 * 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

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)