Re: HTTP Request errorThe errors is triggered by the JSON to Data Table, the HTTP request runs smoothly.
I guess it's because the HTTP call returns a csv file, no JSON.
HTTP Request error[Moderator's note: This thread was originally posted in the Discussions board. Because it was from a staff member it was moved to the SE Discussions which is the appropriate place for staff to ask for assistance. Before it was moved a non-staff member replied.]
Hi everyone,
I played around with automated data refresh using data from a website.
when opening the website with a single open prompt like this in a script:
Open( "https://www.bundesnetzagentur.de/_tools/SVG/js2/_functions/csv_export.html?view=renderCSV&id=1081180" );
Here get the data table without issues.
When using the HTTP Request (which I need to make the data updateable in JMP Live) I run into issues:
request = New HTTP Request(
Url( "https://www.bundesnetzagentur.de/_tools/SVG/js2/_functions/csv_export.html?view=renderCSV&id=1081180" ),
Method( "Get" ),
Insecure
);
request << Send;
data = request << Send;
dt = JSON To Data Table( data );
"Unexpected ".". Perhaps there is a missing [ or {.
Line 1 Column 1: ►.;10/2021-09/2022;10/2022-09/2023;Minimum 10/2018-"
Is there a way to get the data via HTTP Request?
Not sure if the "." as the first character is the problem or something else.
Thanks
Jonas
Automation and ScriptingRe: HTTP Request errorMaybe I just chose the wrong command to turn "data" into a JMP data table.
Just as a follow up to this regarding JMP Live updating tables:
Are there any limitations when changing the data table after updating?
Here are some examples where new columns got added: Data Refresh Scripts - JMP Product Management - Confluence (atlassian.net)
I would need to add formula columns and some more things every time the table updates.
Many thanks,
Jonas
Re: HTTP Request errorHi Jonas,
no, there are not really any limitations as far as the data refresh is concerned. You can do the same data preparation steps that you can do during an interactive publish.
One thing to keep in mind though is that for security reasons file access has been disabled in JMP Live 17
-dieter
Re: HTTP Request errorThanks Dieter, good to know.
Since file access is not available, the first request does not need to be solved anyway.