Import data from SQL Server to Couchbase
I would like to initially populate a bucket (also create the bucket) from data that currently resides on our SQL Server. Would someone be so kind as to give me an example of how this is done? Thank you.
The first problem that I have is that Couchbase doesn't seem to want to install on my Ubuntu Server. But that is another thread in another forum although I will take suggestions.
The solution that I am looking for involves a SQL Server so as you surmised I am looking for a .NET/C# language solution. I have a class/model that will contain the information that I want to store (and retrieve). I can read from SQL Server and put the appropriate data into my model. So the first two steps that you outlined I can handle. The next two I need help with. Is there a JSON serializer that is part of Couchbase SDK or do I need to install something like JSON.NET so serialize my objects? Finally the last step. My Couchbase server will be on a Linux machine so I will need to connect to it, create a database, and store the serialized object in the database. I would like a code example to do this. The URL is helpful in that it gives me guidance on how best to construct my model but the nitty-gritty details of how this is done for Couchbase is missing.
Thank you.
For JSON serialization, the Couchbase .NET client relies on JSON.NET. There are more details at http://www.couchbase.com/develop/net/next. However, as long as you store and retrieve valid JSON strings, you are free to use any JSON library of your choice.
Hello rkb,
you have some options of doing it, but in practice you certainly have to do some processing with it (since the data model is different).
Which programming language / SDK do you plan to use (I can think of .NET if you mean "SQL Server")?
In general, I can think of the following steps
- Fetch the data out of the SQL Server
- Merge/Process it to fit the model you want it to look like inside Couchbase Server
- Convert the Entities to JSON
- Store them with the Couchbase SDK
If you can give us more information on what you want to store, we can be more specific I'm sure. You can also look here (http://www.couchbase.com/docs/couchbase-devguide-2.0/documented-oriented...) as a starting point!
Best,
Michael