Extension talk:JsonConfig/Tabular

About this board

"Edit as table" doesn't keep null values

3
Julio974fr (talkcontribs)

The "Edit as table" button replaces the null values for numbers with 0s, which is a problem for some cases where null values actually mean "empty cell". Can anything be done about it?

PerfektesChaos (talkcontribs)

Well, these are only rectangular tables with strict typing.

If strictly typed an element in a numeric column is not permitted to have any other value than numeric, and null is of different type than numeric.

If you want to specify explicitly irregular data you might need -1 or -9999 or -1E99 and check for them.

Julio974fr (talkcontribs)

But then there is a problem, because it is then possible to click "edit as table", exit it after doing nothing, and the null values will be erased. There needs to be an exception for it to read empty cells as "null". And I can't use other values for irregular data either without changing the Graph templates, which themselves need to accept any numeric value.

Reply to ""Edit as table" doesn't keep null values"
Alexis Jazz (talkcontribs)

@Yurik: "Unless a good reason is given, there will be no way to access data directly from wiki markup. Introducing a complex wikimarkup function to get a single cell's value seems overly complex and error prone, and should be done via Lua functions."

Does the creation of 100000+ pages because wiki markup to access data in tables doesn't exist count as a good reason?

Yurik (talkcontribs)

@Alexis Jazz just because something is being done does not mean it has to be done that way -- could you elaborate what is being done there and why? It might very well be a good reason, or it might be that there is a much better way to do that.

Alexis Jazz (talkcontribs)

To quote MarcoSwart (Bureaucrat and interface administrator on Dutch Wiktionary, not just a random user) whose bot did this: "To use the Data: namespace on Commons we'd need a Lua script to query the data. This would needlessly complicate managing it all." (originally: "Om de Data: naamruimte op Commons te gebruiken, moet er vervolgens weer een Lua script komen om de gegevens te raadplegen. Die oplossing zou ook qua beheer in dit geval zaken nodeloos compliceren.")

If there were a simple way to obtain the data using wikimarkup we'd probably be using the Data: namespace. If there were some off-the-shelf module (that we don't need to maintain) that would allow one to say {{#invoke:mydatawhereisit|SELECT preval-nl FROM Leesonderzoek2013 WHERE woord = '{{{1|{{PAGENAME}}}}}'}} in which "Leesonderzoek2013" would refer to Leesonderzoek2013.tab and putting this on wikt:nl:eland would return "98".. we'd most strongly consider that. (I would prefer it over the current solution but I can't speak for the rest of the community) Actually if that were possible the usage of tabular data would likely explode across projects. Because right now, while I've been told on multiple occasions that I'm not stupid, I'm having quite some trouble figuring out how any of this works.

Alexis Jazz (talkcontribs)
Reply to "A good reason"
Smalyshev (WMF) (talkcontribs)

Is there a way for an external tool to get raw data on the tab page as JSON/CSV/TSV? If yes, how? If not, it'd be a nice addition I think.

Yurik (talkcontribs)

External tool can very easily get that data via the MW API - as raw JSON. In the future, we might also want to add some extra functionality to flatten it, e.g. resolve multilingual strings.

Reply to "Data export?"
There are no older topics