Multiple datasources

Hi Guys,

I’m trying out druid (very nice btw) and I have some questions on infrastructure and querying.

I have multiple clients that feed data into a system and the idea is to have these data ingested in real time into druid, store and run all the aggregations, etc. Each client has their own data, so my idea was to create one datasource for each client and use tranquility to ingest the data on the correct datasources. I planned to make the datasources the client id for example, one issue I found is that tranquility requires an spec file that describes the datasources name and specs. My specs will be all the same but the names (client ID) will vary and will be way too many to put on the config file. Any way around this? Should I take a different approach?

My other question is regarding to queries…Lets say I want to query the sales count by category and product.

I know I can get the results:

category 1

product 1

count 5

category 1

product 2

count 6

category 3

product 3

count 3

but I’d like something like:

category 1

product 1

count 5

product 2

count 6

category 2

product 3

count 3

Is this possible? I couldn’t figure a query to work this issue.

Thanks in advance for any helps and congrats for the very nice product.

Rodrigo

The following doc should help:
http://druid.io/docs/0.9.0-rc1/querying/multitenancy.html

BTW, if you are more comfortable with just using SQL queries, you should use https://github.com/implydata/plyql

PlyQL also acts as a query planner for Druid and will execute queries optimally.

I’m sorry, I looked for multitenancy under “Good Practices”, “Configuration”, etc but didn’t minded to look under Queries… Thanks for pointing!
I’ll check PlyQL too, ty!