Documents not showing in Cosmos Emulator - azure-cosmosdb

I'm using the Cosmos Emulator (v. 2.11.13.0) to develop locally.
My program works fine with the emulator, but the stored documents don't show up in the document explorer:
I can see the documents just fine using Microsoft Azure Storage Explorer (v. 1.16.0):
The Cosmos DB Accounts explorer in Storage Explorer is deprecated - which is also why I'm afraid to update it to a newer version.
I can create new documents via the Azure Cosmos DB Emulator explorer and save them.
Then they show up in the UI:
But when I click the update icon, they immediately disappear from the list (though the info is still visible in the details panel):
The document continues to exist when viewed in the Storage Explorer.
I've tried doing as clean an install as possible and used multiple different versions:
I've uninstalled the program via "Apps & Features"
I've removed all files in
%LOCALAPPDATA%/CosmosDBEmulator
%PROGRAMFILES%/Azure Cosmos DB Emulator
I've tried version:
2.11.13
2.9.0
2.7.2

Related

Is there a way to configure Trigger Email to operate on Firebase Emulator? [duplicate]

I just installed a Firebase extension, and can see it in my Console. How do I get my local Functions emulator to use the extension as well?
When I start the emulators using the CLI, I can see that the functions emulator is 'Watching [locally defined path] for Cloud Functions...', but no evidence that the Firebase extension is downloaded or otherwise watched somehow.
July 2022: It is now possible to run extensions in the emulator. See the documentation on using the Extensions Emulator to evaluate extensions for full details.
There's currently no built in support for running Extensions on Firebase's Emulator Suite yet.
Luckily Firebase Extensions are mostly "just" predefined Cloud Functions with some installation and configuration data. And since Cloud Functions can be emulated, you can get the same functionality locally with some work.
To run an extension on your local emulator, you will have to get the source of the extension (which is linked from the extension's page), and make the Cloud Functions (and possibly application) code connect to the emulators instead of the cloud-hosted services.
Update: There is a workaround, which of the engineers working on Extensions documented here.

Cannot access Firebase Storage after creating storage bucket in GCP Console

I noticed that Firebase wouldn't let me create a storage bucket asia-southeast1 so I upgraded my plan to blaze, went to the GCP console and created a bucket from there.
I did the same for Firestore and it's working fine.
However, after I created the storage bucket in GCP, and I came back to the Firebase console to access Firebase Cloud Storage, I keep receiving this error.
I don't see how creating a bucket in the GCP console may affect your Firebase project (unless you created a bucket named <your-project-name>.appspot.com).
These kinds of errors normally happen when a certain quota has been reached, and is usually solved by upgrading your project to a paid plan.
As you have already upgraded your project, please bear into account that billing updates usually take some time to be processed. Waiting a few hours, or maybe checking the next day whether your project has been successfully upgraded should do the trick.
If that does not help, verify whether you have actually upgraded your project - You can check that here. The Blaze Plan button should be grayed out with the message Current Plan.
The answer provided to this question may also be of help:
Try to activate this feature using an incognito window/private window
and disable all browser extensions
Try using a different browser (and make sure browser is supported)
Verify if there are any other programs that might be blocking your
connection such as antivirus, proxy or firewall. If yes, try to
disable them.
Connect using a different network.
Connect using a different device.
Check the Developer Tools Console for any errors.
For Safari: Safari > Preferences > Advanced > Check "Show Develop menu
in menu bar" Develop > Show Web Inspector > Console Tab
If none of these approaches work for you, consider contacting Firebase Support here.
I fixed mine by using the command to work on it using
firebase init storage
This would create the storage after that it would add a storage.rule in which you can update to your liking in your project .
Then you run this command
firebase deploy --only storage
This would initialize the Storage
If you are still having issues check out this link https://stackoverflow.com/a/74750337 which was also provided by firebase for me to fix the error

Azure Table Storage vs CosmosDB with Python

I am trying to access Azure Table Storage via python.
Following an old walkthrough here:
https://learn.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-python#install-the-azure-storage-sdk-for-python
but the Python SDK it references for Azure Tables specifically (https://github.com/Azure/azure-storage-python) has been moved/deprecated in favor of Azure Cosmos DB SDK.
In the deprecation note, they say to use this SDK:
https://github.com/Azure/azure-cosmosdb-python
In the documentation for that SDK, they refer you to https://azure.microsoft.com/en-us/develop/python/
In the Table Storage and link on that page, it refers you back to the first link (!!)
============
1) All I want to do is query traditional Azure Table Storage (NOT CosmosDB) with a Python SDK
2) Ideally, that Python SDK also includes the encryption/decryption capability for Azure Tables.
What am I missing / does that python SDK still exist anywhere?
Note:
I see https://github.com/Azure/azure-cosmosdb-python/tree/master/azure-cosmosdb-table
but this SDK seems to require a CosmosDB deployment -- it can't connect to traditional AzureTables. Is my understanding incorrect?
Thanks for any help you can offer.
The Azure CosmosDB Table SDK IS Azure Storage Tables SDK. Re-branding is part of some re-org inside Microsoft, but this is the same code and same endpoint, same everything.
Storage SDK was one big client, it was split into Table/Queue/Blog/Files packages, in order to give ownership of Table to CosmosDB team.
https://learn.microsoft.com/en-us/azure/cosmos-db/table-support
The new Azure Cosmos DB Python SDK is the only SDK that supports Azure
Table storage in Python. This SDK connects with both Azure Table
storage and Azure Cosmos DB Table API.
You can also compare the code, you'll see:
https://github.com/Azure/azure-storage-python/tree/v0.36.0/azure/storage/table
https://github.com/Azure/azure-cosmosdb-python/tree/master/azure-cosmosdb-table/azure/cosmosdb/table
(I work at MS in the Azure SDK for Python team)
Azure Table Storage has a new python library in preview release that is available for installation via pip. To install use the following pip command
pip install azure-data-tables
This SDK is able to target either a Tables or Cosmos endpoint (albeit there are known issues with Cosmos).
For your use case of querying an Azure Table Storage account, there's two query methods.
Querying a single table:
from azure.data.tables import TableClient
table_client = TableClient.from_connection_string(conn_str, table_name="myTableName")
query_filter = "RowKey eq 'row_key_5'"
for entity in table_client.query_entities(filter=query_filter):
print(entity)
Querying a storage account for tables:
from azure.data.tables import TableServiceClient
table_service_client = TableServiceClient.from_connection_string(conn_str, table_name="myTableName")
query_filter = "TableName eq 'myTable'"
for table in table_service_client .query_entities(filter=query_filter):
print(table.table_name)
For more samples on the library check out the samples hosted on the Azure GitHub Repository.
(FYI I work at Microsoft on the Azure SDK for Python team)
Indeed , Azure hides part of the Table Storage SDK guided links facilitate the promotion of the Cosmos DB Table API. As you mentioned in your answer, the Azure Storage SDK is now incorporated into the Cosmos menu.
However , I found the old Azure Table Storage Python SDK from previous version in the repo.
You could refer to the above link even if it's no longer updated.
By the way, you could see the benefits by moving to Azure Cosmos Table API from Azure Table Storage from this link.
Hope it helps you.

how to use pre-populated database with tidesdk/titanium desktop

I'm in need of some help in developing a desktop application with a pre-populated database. I have tried numerous ways to get this working including those mentioned on both Tidesdk's API here http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.Database.DB and at Titanium Desktops old API here http://developer.appcelerator.com/apidoc/desktop/latest/Titanium.Database-module.
While the later (using Titanium not Ti) works in creating a database in the apps directory it does not install my pre-populated sqlite database which is located in the resources file of my app.
A couple of my attempts located below
var db = Titanium.Database.openFile('test_db.sqlite', 'test_db');
var db = Titanium.Database.openFile(Ti.Filesystem.getFile(
Ti.Filesystem.getApplicationDataDirectory(), 'test_db.sqlite'));
var db = Ti.Database.open('test_db');
As stated most of these manage to create a database with the name given but when trying to run something as simple as a db.execute(SELECT) of something I know would exist in my pre-populated db I receive an error stating
Exception executing: SELECT name, id FROM people ORDER BY name COLLATE NOCASE, Error was: SQL Statement invalid or database missing
I have searched high and low for something to answer this but everyone continues to refer to the aforementioned API's or to the Mobile API's Ti.database.install() which does not work either.
Is it possible with titanium desktop to use a pre-populated sqlite database or do I have to populate it after I create it? If so any direction would be helpful (where to place the .sqlite file in the app and what functions to call).
I am currently using Titanium Studio with a titanium desktop osx SDK of 1.2.0.RC4 as requested by tidesdk.org until they have released there open source sdk.
Thanks in advance
This is possible, I just used this feature in a recent desktop app, deployed it successfully to Windows and Mac.
In my experience, sometimes your database file can be corrupted, for example if you use the Titanium.Database.install command, and it cant find the file to preload from (maybe the first time you specified the path wrong for instance), it will create the file itself, any subsequent install commands will not work because it already thinks this database has been installed.
Have you tried clearing out the application data? This is where titanium installs the database. For Mac this is in your /User/Library/Application Support/APPNAME directory. Their is a directory for databases, delete this and try again.
Also, this answer on Titanium Q&A may help, it talks about the process with the Mobile SDK but the Database stuff is the same.
Hope this helps!

how to connect to a sqlite db using sequel pro

Hi I installed QLite Pro but Im unable to connect to a local SQLite file db how can I do this?
The fields to fill are:
Name:
Host: requeire
UserName:
PassWord:
Database:
Port:
At the end I solved this by using the program DB Browser for SQLite, I also tried the Firefox plugin but this one is better.
You can't! Sequel Pro is only for MySQL databases.
Same problem here, i couldn't make it work.
So I downloaded this firefox plugin: https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ which works fine.
Here's a small guide on how to open a sqlite database from a app in the iPhone simulator
Run your application on simulator (so that the database file will be copied to your application's documents folder (don't bother if you don't know exactly what it means))
Run the SQLite Manager plugin in Firefox (Tools -> SQLite Manager)
Open the database (You can find the file by navigating: /Libraries/ApplicationSupport/iPhone Simulator/User/Applications/(*number)/Documents
*number is some sequence of hexadecimal numbers identifying current application bundle - you must just find the proper folder (it will contain .app)
It is also possible with database on device, but first you must download application's documents folder to some place on your computer. You can download the folder by going in Xcode -> Organizer, then select your Device and Summary Tab, then under the Applications list find your application, click the triangle |> to expand it, then click the arrow on the right to download the application's documents folder.
Source: http://www.iphonedevsdk.com/forum/iphone-sdk-development/42573-browsing-sqlite3-database.html

Resources