tableau / hyper-api-samples

Sample code to get started with the Hyper API.
https://help.tableau.com/current/api/hyper_api/en-us/index.html
MIT License
132 stars 71 forks source link

Request for sample of connection to a external hyperprocess #57

Closed rferraton closed 1 year ago

rferraton commented 2 years ago

Would it be possible to have a sample in Python for openning a connection to an hyperprocess that is already openned by another process ? Using tcp and a fix port for exemple.

jkammerer commented 2 years ago

This is not possible. The Hyper API may only connect to the Hyper instances that was started by the process running the Hyper API. This limitation is not due to technical limitations but rather a product decision to limit the usage of Hyper as a general purpose database system.

I am interested in what you are trying to build. Can you describe your scenario?

rferraton commented 2 years ago

I try to load data into hyper table(s) in parallel from several process.

I was asking this because of a post that open an hyper process on a docker and connect to it with separates sessions.

jkammerer commented 1 year ago

The post you linked uses psql to connect to Hyper instead of the HyperAPI. With this, the restriction is bypassed. This is not supported. With the HyperAPI you could spawn multiple Hyper Processes while restricting the memory usage of each one using the "memory_limit" process setting. But I am not sure if you will be able to speed things up with that.

To conclude: Multiple connections to one Hyper Process are not supported and also won't be any time soon.