Hi Raman,

Sorry for the late reply but here it goes.
So Gora is currently tied to Avro serialization thus you could start with
Generic Avro Records, add properties, and schemas and whatever else you
need at runtime. Then also you would need to convert those GenericRecords
into Avro SpecificRecords that is what Gora uses [1] (btw you would have to
make it extend from Gora PersistentBase) and then just use them. Of course
this option might not be the fastest in terms of performance but you'd have
to tried out and let us know ;)
That would be a nice example to do/have though


Best,

Renato M.

[1]
http://apache-avro.679487.n3.nabble.com/Direct-conversion-from-Generic-Record-to-Specific-Record-td4029324.html

2017-07-18 21:41 GMT-07:00 raman gupta <ramandu...@gmail.com>:

> Thx Alfonso,
>
> I will have a look.
>
> Regards,
> Raman Gupta
>
> On Tue, Jul 18, 2017 at 8:56 PM, Alfonso Nishikawa <
> alfonso.nishik...@gmail.com> wrote:
>
>> Hi, Raman.
>>
>> Short answer: no.
>>
>> Long answer:
>>
>> I am working on a personal branch that compiles schemas at runtime (and
>> the idea is propose to merge to master later). You can see in [1] one of
>> the important commits, and at [2] is the branch with changes that allows it
>> (and more stuff). You can checkout it and take a look at the history and
>> diff with the master branch. Sadly by now I am sticking with the 0.7
>> release.
>>
>> Here [3] you can see an example about how I create a datastore for a
>> persistent class. In the "TableEntity" class [4] goes the schema and the
>> mapping that will be used to compile the persistent class at runtime, and
>> the mapping to create the datastore.
>>
>> Know that this is quite much information for someone new with Gora, so
>> don't feel frustrated. Ask anything you want and I will try to answer
>> whenever I have some time :S
>>
>> Regards,
>>
>> Alfonso Nishikawa
>>
>> [1] - https://github.com/alfonsonishikawa/gora/commit/d607fdfe37c3
>> 167fb997708811effc5c94f54af3
>> [2] - https://github.com/alfonsonishikawa/gora/tree/goraexplorer
>> [3] - https://bitbucket.org/alfonsonishikawa/goraexplorer/src/26e7
>> e00753320ae7be5daffeb989f6908cf65c4e/src/main/java/com/nishi
>> lua/goraexplorer/tables/DataStoreManager.java?at=master&
>> fileviewer=file-view-default#DataStoreManager.java-54
>> [4] - https://bitbucket.org/alfonsonishikawa/goraexplorer/src/26e7
>> e00753320ae7be5daffeb989f6908cf65c4e/src/main/java/com/nishi
>> lua/goraexplorer/tables/TableEntity.java?at=master&fileviewe
>> r=file-view-default
>>
>>
>>
>>
>> 2017-07-18 7:38 GMT-01:00 raman gupta <ramandu...@gmail.com>:
>>
>>> Hello all,
>>>
>>> I am new to Gora and currently exploring it for my use case. From
>>> documentation and tutorials it seems that we need to define the avro
>>> schemas for our data models and these schemas should be known at compile
>>> time.
>>> Is there a way to create the schema at run time as we might not be
>>> knowing the schema upfront.
>>> Any help or pointer on this would be very useful.
>>>
>>> Thanks & Regards,
>>> Raman Gupta
>>>
>>
>>
>

Reply via email to