Open wittenator opened 6 years ago
Looks like a bug. Have you tried something like
a = alasql('SELECT * FROM CSV(a)')
b = alasql('SELECT * FROM CSV(b)')
result = alasql(`
SELECT proj.institution_id AS instid FROM ? AS proj
JOIN ? as inst
ON proj.institution_id = inst.institution_id
`, [a,b])
?
I played a bit around and apparently the version with the separated subqueries works. At the same time, if I change alasql.promise('...')
to alasql(['...'])
(which should be equivalent, right?) I get the following error:
ReferenceError: HTMLElement is not defined
at alasql (/home/tim/HCC/IKON-backend/node_modules/alasql/dist/alasql.fs.js:130:54)
Ohh - that is very bad! Any chance you could share the full code generating the problem?
Sure, luckily my project is open-source. I got the problem with both Node.js 8 and 10. https://github.com/FUB-HCC/IKON-backend/blob/master/src/apiserver/Dataloader/dataloader.js
Sadly the project uses an external API, so I can't commit everything to the repo. If you want to test it, you'll need an Google Maps API key for geocoding. (I'll send you the config in this case.) If I can help somehow, just tell me!
Hi,
I am currently working on an application which should crossreference a bunch of CSV files. For that I thought of using Alasql. I browsed the repo a bit and found the discussion concerning the broken Sub-SELECT. Therefore I implemented my loading logic like that:
But for some reason I get the following error:
I tried the SELECTs without a JOIN separately and they are working. Afterwards I had a look at the Alasql code(especially since the alasql fs functions seem to have a problem), but couldn't find an exact reason for that error. Did anyone face similar troubles?