Cosmos DB and Azure.iOS data query issues - ios

I'm fairly new to Cosmos DB so for starters I created a MongoDB based instance. I then wanted to add a document to it, just as a "Hello World" test. I'm using a self made iOS app for this which uses the official Azure.iOS library from GitHub.
Once I run the "create" command (with the proper collection id set) on AzureData the framework returns me a "success" inside the response with a resource id etc. However once I use an external tool such as Robo3T or the mongo shell the given collection is said to be empty, or returns this error:
{"code":400,"body":"Command find failed: Unknown server error occurred when processing this request.."}
The connection to the DB however is successful since I can display the collection stats and so on.
Now if I open my app again and query the collection documents through the Azure.iOS framework it returns me the result I just saved. This makes me feel a bit puzzled. Did I miss doing something inside the app, or do all MongoDB tools fail listing the documents? The documentation for the framework is rather sparse so any help would be appreciated.

Actually the issue that happened for me is very hard to debug. Since the error messages don't tell anything.
My Cosmos DB is using the MongoDB backend which seems to create issues together with the mentioned Azure.iOS framework.
The issue is further described here:
Cosmos Mongodb query fails but azure storage explorer works fine?
TL;DR what happened is that the iOS framework was not creating a "_id" which is necessary for MongoDB and that lead to corrupted data. I had to switch from MongoDB to the SQL backend. This solved my issue and now everything works fine.

Related

"failed to get context" error against real server, works fine with mockserver

Following the ODATA V4 tutorial in step 2: app runs against mockserver, tips are given to run it against a real server. Used the existing index.html as test/mockServer.html and created a new index.html, pointing to ComponentSupport for oninit. Added cors-anywhere and adjusted the manifest. Works well, both mockserver and real.
That was in step 2 and the app worked fine also against a real server. Fast-forward to step 5 and I notice the app fails to load any data when running against a real server. Long story short, the backend is throwing an error, not even "count" together with "top" is accepted. I checked the docs for ODATA, "count" does not seem to be an exclusive option.
Am I fundamentally misunderstanding the way ODATA works? I am especially puzzled by the fact that the mockserver runs fine.
EDIT: created bugreport
As reported in the closing comment of my bugreport, Microsoft has confirmed the issue: "This was due to an error in the version of the OData WebAPI library we were using in the backing service. I have an update with various fixes, including updating to the latest WebAPI library that contains this fix, that I just haven't pushed out to production yet. Let me see when if I can get that deployed."

Neo4J Connection issues to local project

I am really sorry to ask a simple question like this, but it is getting frustrating. I installed neo4j 4.0.4 on my Windows machine, created a new project as shown in the official tutorial video and set a password for my local graph. Funnily, the tutorial video ends after setting the password and opening the browser not showing how to perform Cypher queries on this newly created database. In neo4j Desktop my database is shown correctly and it seems to be up and running.
However, when I try to connect to this database via the browser, I do not see the database at all. It is so confusing when connecting to the server to specify a username and password, if you only need to set a password for your database?! The default neo4j user can see the system and default database but not my project database. In addition, I cannot link files from the project directory in Cypher queries. I tried to disable authentication, but it did not help at all.
When I issue SHOW DATABASES command, it does not list my database as well.
Update / Edit:
Seems I misunderstood the concept of projects. Every database is named neo4j - default, regardless of the name specified in the project ?!. However, I still cannot access project files. So far, I copied the files manually in the database directory under "imports". But I guess that is not the intended way.
After importing data to this default database, it still shows no data in the project itself.
Data files in the imports directory are not automatically imported into the DB. That is because neo4j has no idea how you want to store that data as nodes and relationships.
So, it is up to you to determine your desired data model, and then write the appropriate code to enforce that data model.
You can take a look at this page to learn about how to import CSV data (probably the most commonly used import data format).

How can I update over a linked server with code first migration?

I am using entity framework 6 with code first. During deployment I need to make an update across and existing linked server. When I try this I get:
"MSDTC on server 'myLocal' is unavailable."
This problem happens when running agianst my local instance. MSDTC is not enabled on that instance but I have no trouble running this update manually in SQL Server. I don't want every developer to have to enable MSDTC for this one command.
I have tried adding this as a migration using a DbMigration.Sql and I get the error. I have also tried it in the seed method of DbMigrationsConfiguration using context.Database.ExecuteSqlCommand and I get the error.
ADO.NET Transaction scopes that go across servers - including linked servers - will automatically start the Distributed Transaction Coordinator (DTC). I think your best bet is to update the other database with a direct call in the migration, rather than through the linked server.

Neo4J web console has stats for my embedded data, but cannot query it

I'm currently evaluating Neo4J (2.0M3), and in an attempt to get some kind of visualisation and query-exploration (I haven't succeeded yet!), I switched from using the Test DB to an Embedded DB, and have a Server that I can start up when required.
I understand how to get my node and relationship data written to the data directory of my choice (via How to explore databases created by an embedded-Neo4j Java application and stored outside the /data directory?), and how to configure the Server/web console to point to that directory. Sure enough, the Dashboard does show the data counts I expect, but no Cypher query I try - not even the ones that work fine in my unit tests - return any nodes. Simple lookups by name and Id all fail.
Can anyone explain the inconsistency? This happens with a vanilla Server install, with data written to the default graph.db directory, as well as with different directories. The paths under 'Server Info' are all what I expetc to see.
Another thing I don't understand: why can I not have my own Server running, and create a GraphDatabaseFactory/GraphDatabaseService in code that will accept a server URI, which will allow me to use the standard Java API and see live updates in the web console without having to stop/start the server each time?
You can set up your embedded java project to even start a server, see http://www.cakesolutions.net/teamblogs/2012/05/23/enabling-neo4j-web-admin-tool-on-the-embedded-server-using-spring-data/

SSIS Data Flow for a Noob

I'm still very new at programming, and our local SSIS genius isn't here today for me to pick his brain.
I am working on an existing SSIS package and am making modifications to a specific .dtsx file. The data flow has an OLE DB source, which I have successfully changed the sql query to fit my project specs. The Destination is a connection flat file, which I have modified the column mappings to fit the new query.
I have a few concerns:
The source connection originally used SQL Server Authentication, and I don't have the user name or password. I can use Windows Authentication to test it locally, but in the end it will be set up by someone else as a scheduled task on a server somewhere. (I realize this is probably a question for people at my work, but I figured I would fill you guys in).
The destination preview doesn't show anything. I can, however, successfully parse and preview the Source query...
I also don't understand what "Error Output" means on the Source Editor.
Is this set up correctly already, or does it mean there will be some errors in the output?
Any explanations or elaborations would be helpful, but my overall question is: "Am I missing something for this .dtsx, or is this project finished and ready to be set up as a scheduled task?"
It will depend on the package configuration. usually user\password are read from a configuration mechanism (file or server)
Yes, it should be fine
It means what should the task do when it finds an error. It can fail the component or ignore the error for example

Resources