Skip to content

Cannot load FileAttachment into Mosiac in Observable Notebook #582

Answered by jheer
josesho asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @josesho! We include examples of using Mosaic in Observable Framework here: https://idl.uw.edu/mosaic-framework-example/mosaic-duckdb-wasm

Framework provides a sql property in the YAML front matter that is easier to use than FileAttachment.

You can use a file attachment, however. You must first instantiate the FileAttachment and then use it to get a URL to the file (as opposed to loading it directly). You can then use that URL as input to a load query generator such loadCSV(), and then you have to execute the query. (And, you have to do all of this in a way that "plays nice" with the Observable Reactive runtime, ensuring that the load queries complete prior to making other API calls...…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@josesho
Comment options

Answer selected by josesho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants