Skip to content

Instantly share code, notes, and snippets.

View narendrans's full-sized avatar

Naren narendrans

View GitHub Profile
[
{
"_id": "5ab556035819188e4e0f11ed",
"index": 0,
"guid": "96733393-88fd-4a56-a566-e83bd36ea8a2",
"isActive": false,
"balance": "$1,612.00",
"picture": "http://placehold.it/32x32",
"age": 27,
"eyeColor": "blue",
{
"description": "my doc",
"foo": {
"bar": "baz",
"quux": "revlos",
"level1" : {
"l2string": "l2val",
"l2struct": {
"level3": "l3val"
}
from pyarrow import flight
import base64,time,pandas
class HttpDremioClientAuthHandler(flight.ClientAuthHandler):
def __init__(self, username, password):
super().__init__()
self.username = bytes(username)
self.password = bytes(password)
self.token = None
@narendrans
narendrans / Dockerfile
Last active September 15, 2020 19:26
Superset with Dremio ODBC on Centos7 Docker image
FROM centos:7
RUN yum install -y python3 python3-devel python3-pip unixODBC unixODBC-devel python3-setuptools gcc gcc-c++ https://download.dremio.com/odbc-driver/dremio-odbc-LATEST.x86_64.rpm && \
pip3 install apache-superset sqlalchemy_dremio && \
export LC_ALL=en_US.UTF-8 && \
superset db upgrade && \
superset init && \
export FLASK_APP=superset && \
flask fab create-admin --username admin --firstname admin --lastname admin --email admin@admin --password admin
@narendrans
narendrans / Main.java
Last active May 30, 2023 10:38
Dremio JDBC example
// Requires JDK 1.8
// Run it with:
// javac Main.java && java -cp .:dremio-jdbc-driver-20.0.0-202201050826310141-8cc7162b.jar Main
// If the output in terminal shows the following then the test is successful.
// Printing the result
// -------------------
// User: dremio
// -------------------
import java.sql.*;
@narendrans
narendrans / Program.cs
Last active January 7, 2024 15:35
Dremio C# example using flight sql odbc driver
using System;
using System.Data.Odbc;
class Program
{
static void Main()
{
string connectionString = "DRIVER={Arrow Flight SQL ODBC Driver};host=localhost;UID=dremio;PWD=dremio123;PORT=32010;UseEncryption=false;DisableHostVerification=1;DisableCertificateVerification=1;HandshakeTimeout=100;ROUTING_TAG=testing";
using (OdbcConnection connection = new OdbcConnection(connectionString))
{