Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Pasar la variable de Azure Databricks a la secuencia de comandos Html

Estoy tratando de pasar una variable de un comando de databricks anterior a este, pero sigo recibiendo un error de clave. Aquí está el código de abajo...

 htmlCode = """ <div id="61534155"></div> <script type="module"> import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js"; import define from "https://api.observablehq.com/d/7c6f1f9fe48d9231.js?v=3"; const main = new Runtime().module(define, Inspector.into("#61534155")); main.redefine("file", fetch(sampleJson).then(response => response.json())); </script> """ displayHTML(htmlCode.format(sampleJson = jsonFile))

jsonFile es la variable de un comando anterior que intento pasar a este código HTML. Sigo recibiendo el error "KeyError: 'Runtime, Inspector'" ¿Alguien tiene alguna idea para resolverlo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para importar el archivo json de importación en html en javascript, puede consultar el código a continuación.

 // pure javascript let object; let httpRequest = new XMLHttpRequest(); // asynchronous request httpRequest.open("GET", "local/path/file.json", true); httpRequest.send(); httpRequest.addEventListener("readystatechange", function() { if (this.readyState === this.DONE) { // when the request has completed object = JSON.parse(this.response); } });

También puede consultar este artículo de Chuck Connell

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!