Loading Vega-lite schema + data from local

{
"$schema": "file:///C:/Users/custom4me/Downloads/ELK/v5.json",
"title": "Event counts from MAIN index",
"data": {
"url": "file:///C:/Users/custom4me/Downloads/ELK/seattle-weather.csv"
}
}

How to load from local FS?

I am not sure you can. Last I tried I had to host the file on a web server. I guess you could host it on Kibana's but that's not best practice.

Also your $schema field I don't think works like that. It's a string and not an actual location to a file. So use the below instead

"$schema": "https://vega.github.io/schema/vega/v5.json"

Aaron,

Issue we have is using on Staging Linux machine that does have access to the Internet.

We may not get permission to configure a firewall security rule to allow to fetch from the Internet.

We are thinking local loading (best option) or configuring an internal webservice that will load the files.

Will try the internal webservice loading for "$schema" as well as "url" and check.

Apparently, even loopback webservice does not load the files.

{
"$schema": "http://127.0.0.1:8000/v5.json",
"title": "Seattle Weather, 2012-2015",
"data": {
"url": "http://127.0.0.1:8000/seattle-weather.csv"
}
}

Your schema needs to be exactly like this It's a string and not a URL. So it doesn't try to reach out to the internet. I did the same thing first time I started so I get this. :slight_smile:

"$schema": "https://vega.github.io/schema/vega/v5.json"

your first response made it clear for "$schema" being a String and not an URI. Thanks.

As for "data.url", is there a way to load from local without webservice like placing the file in a certain directory?

Tried "data.url" = "http://127.0.0.1:8000/seattle-weather.csv", but did not work using (v2.7.17) 'python -m SimpleHTTPServer 8000' from the actual FS folder of "seattle-weather.csv".

got it working via CORS. and it prevents directory traversal.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.