Totally agree with Michael's advice to start from an existing adapter.

There is example/csv, an example adapter intentionally kept simple.
But if your adapter is more complex, and involves for instance
generating a query for a back-end DB, then use a more complex adapter
as your template.

Did you look in https://calcite.apache.org/docs/adapter.html? I know
it feels that we are woefully lacking in documentation, but people
don't read the documentation we have, there's not much incentive to
write more.

There's also 
https://www.slideshare.net/julianhyde/a-smarter-pig-building-a-sql-interface-to-apache-pig-using-apache-calcite.

On Thu, Jul 27, 2017 at 8:55 AM, Michael Mior <[email protected]> wrote:
> That's still basically correct. You may find it easiest to model things
> after one of the existing adapters. When I was writing the Cassandra
> adapter, I found the MongoDB adapter to be helpful. It is also a question
> of what the data source you're hoping to add looks like. You'll probably
> have the most success starting with a similar adapter.
>
> --
> Michael Mior
> [email protected]
>
> 2017-07-26 20:16 GMT-04:00 Nirav Patel <[email protected]>:
>
>> https://datapsyche.wordpress.com/2014/07/18/sql-over-
>> anything-with-an-optiq-adaptor/
>>
>>
>>
>>
>>
>> On Wed, Jul 26, 2017 at 5:13 PM, Julian Hyde <[email protected]> wrote:
>>
>> > Where did you look? What did you find?
>> >
>> > > On Jul 26, 2017, at 5:06 PM, Nirav Patel <[email protected]>
>> wrote:
>> > >
>> > > Hi,
>> > >
>> > > Is there any guide/tutorial on how to write adapter for new datasource?
>> > >
>> > > Thanks
>> > >
>> > > --
>> > >
>> > >
>> > > [image: What's New with Xactly] <http://www.xactlycorp.com/
>> email-click/>
>> > >
>> > > <https://www.nyse.com/quote/XNYS:XTLY>  [image: LinkedIn]
>> > > <https://www.linkedin.com/company/xactly-corporation>  [image:
>> Twitter]
>> > > <https://twitter.com/Xactly>  [image: Facebook]
>> > > <https://www.facebook.com/XactlyCorp>  [image: YouTube]
>> > > <http://www.youtube.com/xactlycorporation>
>> >
>> >
>>
>> --
>>
>>
>> [image: What's New with Xactly] <http://www.xactlycorp.com/email-click/>
>>
>> <https://www.nyse.com/quote/XNYS:XTLY>  [image: LinkedIn]
>> <https://www.linkedin.com/company/xactly-corporation>  [image: Twitter]
>> <https://twitter.com/Xactly>  [image: Facebook]
>> <https://www.facebook.com/XactlyCorp>  [image: YouTube]
>> <http://www.youtube.com/xactlycorporation>
>>

Reply via email to