You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Akshat Jiwan Sharma <ak...@gmail.com> on 2017/08/12 03:43:48 UTC

Writing to the connected data source?

Hello Everyone,

My use case is that I'd like to be able to use Drill as a proxy for my 
data sources, not only for querying the data but also for writing the data.
Is it possible to write data to the connected data store using apache 
drill rest api? Or perhaps with a custom function 
<https://drill.apache.org/docs/develop-custom-functions-introduction/>?

As I understand there is a CTAS 
<http://drill.apache.org/docs/create-table-as-ctas/> function allows us 
to create new tables but there are a few restrictions

 >"You cannot create tables using storage plugins, such as Hive and 
HBase, that do not specify a workspace."

Does this mean that there are some storage plugins that do specify a 
workspace. I looked at the documentation of mongodb storage plugin and 
wasn't sure if it did support workspaces? How can I determine if a 
storage plugin is writeable or not?

Thanks,
Akshat

Re: Writing to the connected data source?

Posted by Padma Penumarthy <pp...@mapr.com>.
Workspaces are supported only for file system based storage plugins (DFS, S3).
You can create tables in workspaces, by configuring workspaces as writable. 
Table can be created as file(s) of type parquet, json, psv, csv and tsv, based 
on configuration option “store.format".
For Mongo, creating table is not supported.

Thanks,
Padma


> On Aug 11, 2017, at 8:43 PM, Akshat Jiwan Sharma <ak...@gmail.com> wrote:
> 
> Hello Everyone,
> 
> My use case is that I'd like to be able to use Drill as a proxy for my data sources, not only for querying the data but also for writing the data.
> Is it possible to write data to the connected data store using apache drill rest api? Or perhaps with a custom function <https://drill.apache.org/docs/develop-custom-functions-introduction/>?
> 
> As I understand there is a CTAS <http://drill.apache.org/docs/create-table-as-ctas/> function allows us to create new tables but there are a few restrictions
> 
> >"You cannot create tables using storage plugins, such as Hive and HBase, that do not specify a workspace."
> 
> Does this mean that there are some storage plugins that do specify a workspace. I looked at the documentation of mongodb storage plugin and wasn't sure if it did support workspaces? How can I determine if a storage plugin is writeable or not?
> 
> Thanks,
> Akshat