update cosmos db gremlin vertices using document API - azure-cosmosdb

Can I use cosmos Document APIs to bulk update gremlin api vertices and edges? we are a java shop and Microsoft doesn't have a java client to do bulk imports into cosmos DB gremlin APIs. It is doable, but is it recommended?

There is a Java Bulk executor library for Azure CosmosDB Gremlin API.
Please find more details here
https://learn.microsoft.com/en-us/azure/cosmos-db/sql-api-sdk-bulk-executor-java
Samples are provided on Github
https://github.com/Azure/azure-cosmosdb-bulkexecutor-java-getting-started
An overview of Azure Cosmos DB bulk executor library is here
https://learn.microsoft.com/en-us/azure/cosmos-db/bulk-executor-overview

Related

I have a requirement to load data from azure cosmos db (json format) into snowflake. what are my options?

I tried using nodeJS function to trigger on cosmos change feed and insert into snowflake table columns directly but that seems to be slow. please suggest any other options
You can use ADF that has both snowflake and Azure Cosmos db Connector. Azure Cosmos db will be your source and Snowflake can be used as sink.
Create a linked service to Azure Cosmos DB using UI
Snowflake as sink
Good part is Azure Cosmos db Change feed is now supported in ADF, so this can also be integrated through ADF.
Native change data capture (CDC) - CosmosDB change feed is supported in ADF now

Cosmos db cassandra api write path

Does cosmosdb cassandra api uses same memtable , commit log, systable compaction write path to provide good performance for heavy write operations or is it same as the write operations in cosmos sql api.
Will cosmos cassndra api is suppose to work better then write same no. of write operations in cosmos sql api?

How do I change API in cosmosDB?

I have a cosmosDB with mongo API, however there are many features not supported in this API so I want to switch to SQL API?
As things stand today it is not possible to switch you account from one type to another.
This is what you need to do if you need to switch to the SQL API:
Create a SQL API Cosmos DB Account
Download the Cosmos DBmigration tool
Migrate all the data from the MongoDB account to the SQL API account
Delete the MongoDB account

Post to Azure Cosmos Db from NiFi

I created Azure CosmosDb database and container for my documents.
I use NiFi as a main data ingestion tool and want to feed my container with documents from NiFi flow files.
Can anybody please share a way to post flowfile content to Azure Cosmos Db from NiFi?
Thanks in advance
UPDATE(2019.05.26):
In the end I used Python script and called it from NiFi to post messages. I passed a message as a parameter. The reason I chose python is because it has some examples on official Microsoft site with all the required connection settings and libraries, so it was easy to connect to Cosmos.
I tried Mongo component, but couldn't connect to Azure (security config didn't work), didn't really go too far with it as Python script worked just fine.
Azure CosmosDB exposes MongoDB API so you can use the following MongoDB processors which are available in NiFi to read/query/write to & from Azure CosmosDB using Apache NiFi.
DeleteMongo
GetMongo
PutMongo
PutMongoRecord
RunMonogAggregation
Useful Links
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb-introduction
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb-feature-support
Valeria. According to the components list supported by Apache Nifi related to Azure, you could only get Azure Blob Storage, Queue Storage, Event Hub etc,not including Cosmos DB.
So,I suggest you using PutAzureBlobStorage to feed azure blob container with documents from NiFi flow files. Then please create a copy activity pipeline in Azure Data Factory to transfer data from Azure Blob Storage into Azure Cosmos DB.

MongoDB in Azure Cosmos DB

I was wondering if MongoDB is fully supported in Azure Cosmos DB through the MongoDB API https://learn.microsoft.com/es-es/azure/cosmos-db/mongodb-introduction
I have read that the aggregation pipeline, map-reduce and the full-text indexes is not fully integrated. Does anyone have further information about it? Would you use MongoDB in Azure Cosmos DB considering its current status?
Cosmos DB implements MongoDB wire protocol and many customers already use MongoDB API in production. Aggregation pipeline is in private preview and you can enable it by emailing askcosmosmongoapi#microsoft.com. Map-reduce functionality is mostly covered by aggregation pipiline. Full-text search is partially available through Azure Search, which can index MongoDB collections and $regex operator within MongoDB API covers less complex text search. You can find some other feature requests and their status at https://feedback.azure.com/forums/263030-azure-cosmos-db/category/321994-mongodb-api
Cosmos DB's MongoDB layer implements a large subset of native MongoDB functionality. Specifics of supported features are published here.
You mentioned aggregation pipeline: As of November 2017, this is now supported.
Regarding "current status" of the Cosmos DB MongoDB API: It's a production database with SLA. You'll need to make your own decision on whether to use it, based on feature set and your app's needs.
You can activate aggregation pipeline through Azure portal by going to Preview Features menu.

Resources