I am unable to connect to dremio using dremio_client library on Jupyter NoteBook
Below are the commands which I tried on Jupyter:
from dremio_client import init
client = init('~/.config/dremio_client/')
results = client.query('SELECT * FROM demo_table')
results
And this is the output which I am receiving, I have attached the screenshot below
Also I tried to debug it and I found that this api api/v3/catalog is the issue, it is returning HTML content,
So I tried to access the same api using curl like this:
curl -X GET http://localhost:9047/api/v3/catalog -H "Content-Type: application/json" -H "Authorization: user_token"
and it response of the above api was this:
<!--
Copyright (C) 2017 Dremio Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<title>Dremio</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<script type="text/javascript">
window.dremioConfig = {
serverEnvironment: "PRODUCTION",
serverStatus: "OK",
environment: "PRODUCTION",
commit: "27f36e19b9c97f6e0da9de58baa9cefec6498535\nWith uncommitted changes:\nM dac/ui/npm-shrinkwrap.json",
ts: "Wed Jul 19 2017 08:21:36 GMT+0000 (UTC)",
language: undefined,
useRunTimeLanguage: undefined,
intercomAppId: "gdcxa2zo",
shouldEnableBugFiling: false,
shouldEnableRSOD: false,
supportEmailTo: "",
supportEmailSubjectForJobs: "",
outsideCommunicationDisabled: false
};
</script>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#55bfce">
<meta name="theme-color" content="#2b3a4b">
<link href="/style.45b736e736ded57c7d60156a62efd9ab.css" rel="stylesheet"></head>
<body>
<div id="root">
</div>
<script type="text/javascript" src="/vendor.4f9b93ca2e53d2a94faa.js"></script><script type="text/javascript" src="/bundle.4f9b93ca2e53d2a94faa.js"></script></body>
</html>
It would be very helpful, if someone can help me out here.
Thanks in advance