Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure astToDom to target a remote duckdb- server #658

Open
danvergara opened this issue Jan 27, 2025 · 1 comment
Open

How to configure astToDom to target a remote duckdb- server #658

danvergara opened this issue Jan 27, 2025 · 1 comment

Comments

@danvergara
Copy link

Hi!

As title says, I'm having a hard time trying to configure the mosaic client to hit a remote duckdb server instance. Is there a way to configure mosaic client to do so?

Docs says it's done through the Connectors , but I cannot find a connection between the connectors code and the astToDom function.

The docs say the astToDom function can receive a vgplot api context but the code does not accept it.

Thanks in advance.

@jheer
Copy link
Member

jheer commented Jan 27, 2025

Thanks for the issue.

First, by default astToDOM will use the singleton Coordinator instance returned by the coordinator() method. So if you first register your desired connector with that Coordinator (instantiate the connector and register it with the coordinator) it should then get used downstream by astToDOM.

Second, astToDOM should accept your own API context as well. The astToDOM method takes both an AST and an options object as arguments. If the options object includes an api property, the value of that property will be passed down as the API instance to use. If unspecified, a new default API context is created.

Let us know if these aren't working, ideally with some minimal code to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants