druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

Add nice shortcuts to CLI #118

Closed betodealmeida closed 6 years ago

betodealmeida commented 6 years ago
$ pydruid
> SHOW TABLES;
TABLE_NAME
----------------
foo
bar
baz
COLUMNS
SCHEMATA
TABLES
> SHOW SCHEMAS;
SCHEMA_NAME
------------------
druid
INFORMATION_SCHEMA
> DESC foo;
COLUMN_NAME        ORDINAL_POSITION  COLUMN_DEFAULT    IS_NULLABLE    DATA_TYPE
---------------  ------------------  ----------------  -------------  -----------
__time                            0                    NO             TIMESTAMP
count                             1                    NO             BIGINT
location                          2                    YES            VARCHAR
aaaaaa                            3                    YES            VARCHAR
bbbbbb                            4                    YES            VARCHAR
sum_cccccccccc                    5                    NO             FLOAT
>
betodealmeida commented 6 years ago

I'm planning to add support for DROP TABLES, but that requires extra work since it needs to communicate with the coordinator instead of the broker. For the Pinot connector I added an option to pass multiple hosts (server and broker), we can do the same thing for Druid.

mistercrunch commented 6 years ago

@betodealmeida the broker may be able to handle some of the coordinator api. I'm not 100% sure but remember hearing that before. We should get to the bottom of it, it'd be great if Superset could also talk only to the broker.