How to turn on Diagnostic Full-text Query for Cosmos Db with ARM template, CLI or PowerShell - azure-cosmosdb

I need to turn on Cosmos Db Diagnostic Full-text Query as part of deployment pipeline. Ideally would prefer this being part of ARM template, if not then CLI or PowerShell would do. Couldn't find any documentation on this, has anybody had it done?
I also had exported ARM template for the Cosmos Db account with this setting On in portal, couldn't find anything relevant in the template so redeployed the template and the setting was Off when deployed.
Thanks in advance!

Related

Cosmos DB command line tool for loading json docs into containers

We have a need to pre-populate Cosmos DB containers with some static json files. This is a requirement for both local developer Cosmos DB emulator environments, and also Azure DevOps deployments. Ideally those two scenarios would use the same approach of course.
One way I was thinking was to have static json documents in our git repo, and to have a dotnet core command line tool that would connect to Cosmos DB and insert one or more docs to a specified DB and container, per invocation of the console app.
I found this tool which seems like a good fit:
https://github.com/azure/azure-documentdb-datamigrationtool
https://learn.microsoft.com/en-us/azure/cosmos-db/import-data
However, this targets .NET Framework 4.5, and therefore cannot be used easily by our Mac and Linux developers. So one option would be to have a go at migrating that tool to dotnet core.
I also found these bash scripts that seem relevant:
https://github.com/Krumelur/AzureScripts/blob/master/cosmosdb_create_document.sh
Use bash, Azure CLI and REST API to access CosmosDB - how to get token and hash right?
I.e. Windows users could use WSL to run these.
However, I think a dotnet core console app would be the ideal solution here. It seems like an obvious simple tool to want, so was wondering if there is anything already out there.
Or maybe am I thinking about this problem the wrong way?
There isn't anything out there today but the first link you referenced there to the DMT running on .NET 4.5 is being transitioned to a new maintainer, Solliance, who is going to be ported over to .NET Core but there is no ETA as of yet.
The only thing I can suggest is to roll your own app to read from blob storage and insert into Cosmos. The other possible option too is to use Azure Data Factory and create/update a job with new endpoint and keys when you roll a new environment.

Is it possible to create a Dynamo DB table with at rest encryption enabled via the Java SDK

As I understand it, it's not possible to enable at rest encryption after a table has been created. I currently use the Java SDK to create tables but can't see any way to request the table to be created with encryption turned on.
I've used the latest SDK:
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.11.391</version>
And classes com.amazonaws.services.dynamodbv2.model.CreateTableRequest and com.amazonaws.services.dynamodbv2.util.TableUtils#createTableIfNotExists.
I know another option to create tables would be to use something like the CLI or terraform. However, what I liked about the Java SDK API was that it colocates the "schema" right there in the code along with the Java POJO mappings that use it, making it easy to run in tests against the local dynamo db. If I need to write terraform files or scripts to call the CLI these kind of fall "out of band" with the actual code that uses it which feels less ideal.
Is there any way to do this with the Java SDK?

Meteor local vs. admin databases

Where can I find documentation about the difference between Meteor's local and admin DB? I am trying to insert an object into an existing collection from a python script, but I am unsure whether I should insert into local db or admin db.
The MongoDB docs have this information
http://docs.mongodb.org/manual/reference/local-database/
and
http://docs.mongodb.org/manual/reference/system-collections/
Are probably good places to start.

Produce client deliverable artifacts

very new to flyway and have added it to my project using flyway-maven-plugin.
using oracle 11g db.
Looks to be great for database versioning in a development environment but can anyone tell me:
how to use to produce database create/upgrade artifacts that i can send to a customer.
we have packages, data, ddls etc (that would be nice inside an installer)
Thanks in advance.
You can always bundle the migrations directly with the Flyway Command-line tool and send that.

How can I use sqlite in appfog?

I'm using flask on appfog.com to make a personal blog. Today I tried to use sqlite. I can run the application locally with sqlite but when I update the app to AppFog, it does not seem to work. I can't find how to use sqlite in AppFog's docs. Can anyone tell me?
Thanks...
Sorry for my poor english:-)
It's not recommended to use sqlite for your production apps on AppFog because the file storage is ephemeral. Every time you update your app the database will get blown away. You're better off creating and binding a postgres, mysql, or mongodb database service for your app. You can continue to use sqlite db locally but your production app will use the bound service.
See the Bind Service section of: https://docs.appfog.com/languages/python/flask

Resources