GitHub user danieljimenez edited a comment on the discussion: Unable to connect 
to Dremio instance

I tried this and it worked, so the issue seems narrowed down to superset:

```python
from sqlalchemy import create_engine, text

## Arrow Endpoint
host = "dremio-client.data.svc.cluster.local"
location = f"dremio+flight://{host}:32010/dremio"

## Username and Password for Dremio Account
username = "superset"
password = "password"

## Dremio REST API URL To Login and Get Token
uri = f'http://{host}:9047/apiv2/login'

## Payload for Get Token Requests
payload = {
    "userName": username,
    "password": password
}

# Create SQLAlchemy engine using Flight interface
port = 32010

url = 
f"dremio+flight://{username}:{password}@{host}:{port}/dremio?UseEncryption=false&disableCertificateVerification=false"
print(url)
engine = create_engine(
    url
)

query = """
SELECT * FROM example."example".example limit 50
"""

with engine.connect() as conn:
    result = conn.execute(text(query))
    for row in result:
        print(row)
```

GitHub link: 
https://github.com/apache/superset/discussions/34527#discussioncomment-13987844

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to