Is it possible to add a spatial index to Windows Azure Mobile Services?
I added a free Mobile Service free 20mb database, then a table, then a geography type column.
I couldnt add an index to geography column using the 'management portal.' But I connecting remotely using sql server management studio express i managed to write a TSQL to apply a spatial index. It said it succeeded but I couldnt confirm it as the portal doesnt reflect it.
I'm now thinking
1) is it possible to add spatial index to azure sql databases?
2) how do I add the geography type to my Xamarin project for easy read/write using azure component?
// update
I found a 'set index' button on azure dashboard when viewing the table columns but it threw an error:
Column 'Location' in table 'table.place' is of a type that is invalid for use as a key column in an index or statistics
Does this mean Azure database dont support spatial indices?
Spatial indexes are supported in SQL Database (with some restrictions), see: http://msdn.microsoft.com/en-us/library/windowsazure/ff759530.aspx
That said, spatial types are not directly supported with Window Azure Mobile Services; however, you can use converter classes to support additional types that are not handled by the client SDKS. See Carlos Figueira's blog for details.
Related
With the recent preview release of 'Data discovery & classification' for Azure SQL databases, has anybody found where this data is stored and if it can be queried directly from the Azure database? I know for on-premise databases if you right click on a database and choose 'Tasks - Classify Data...' anything you enter into that interface is stored as extended properties on the 'table/column'. However, after entering the same data via the interface in the Azure portal, there are no extended property values that I can find in my Azure SQL database. I would really like to be able to query this classification data directly so I can incorporate other metadata about the column such as data type, sample value, collation etc.
For Azure SQL DB, this metadata is stored in new attributes that have been introduced into the SQL Engine to support tagging column sensitivity, which are currently not exposed. We plan to expose them via REST/Powershell/T-SQL as the feature continues rolling out.
Please follow our announcements and the online feature documentation for updates.
Thanks,
Gilad (MSFT)
I am associating an Azure SQL DB Table to my Azure Search using an Indexer. I am setting this all up using Azure's website: https://portal.azure.com
When I try and create the Indexer in Azure Search, I get the warning about "Consider enabling integrated change tracking on your database." However, I have enabled integrated change tracking on my database and table.
I have successfully setup several tables this way, in the same database, and they're working just fine with Azure Search. However, this table has a schema other than [dbo], and the others with change tracking were [dbo]. The same SQL user is being used for all the tables, and it has been granted the change tracking permission to this table, too.
Is there a problem with the Azure website where I cannot do this via the UI? Can this be done otherwise? Is there a permission issue with my DB's schema? Something else?
Because of this warning, I have not actually created this Azure Search Index.
Any help is appreciated!
It's a limitation of Azure Search portal - it doesn't support enabling integrated change tracking for non-default schemas. The workaround is to create the indexer programmatically, using REST API or .NET SDK. For a walkthrough, see https://learn.microsoft.com/azure/search/search-howto-connecting-azure-sql-database-to-azure-search-using-indexers.
I am new to Azure Search and I have just seen this tutorial https://azure.microsoft.com/en-us/documentation/articles/search-howto-dotnet-sdk/ on how to create/delete an index, upload and search for documents. However, I am wondering what type of database is behind the Azure Search functionality. In the given example I couldn't see it specified. Am I right if I assume it is implicitly DocumentDb?
At the same time, how could I specify the type of another database inside the code? How could I possibly use a Sql Server database? Thank you!
However, I am wondering what type of database is behind the Azure
Search functionality.
Azure Search is offered to you as a service. The team hasn't made the underlying storage mechanism public so it's not possible to know what kind of database are they using to store the data. However you interact with the service in form of JSON records. Each document in your index is sent/retrieved (and possibly saved) in form of JSON.
At the same time, how could I specify the type of another database
inside the code? How could I possibly use a Sql Server database?
Short answer, you can't. Because it is a service, you can't specify the service to index any data source. However what you could do is ask search service to populate its database (read index) through multiple sources - SQL Databases, DocumentDB Collections and Blob Containers (currently in preview). This is achieved through something called Data Sources and Indexers. Once configured properly, Azure Search Service will constantly update the index data with the latest data in the specified data source.
I am implementing offline capabilities to the store app using .NET backend Mobile Service with on-premise SQL server. In my SQL Server already have tables and data in it.
So, I added all the required models in to mobile service project and published the mobile service to azure. Also added all five system properties Id, CreatedAt, Deleted, UpdatedAt and Version to the existing tables in Database manually to enable database tables for offline capability.
But, My issue is one of the table already have a rowversion type column, So, when I tried to add Version column into the table it gives an error 'A table can have only one rowversion column',
My problem is I cannot rename the existing rowversion column to Version because the same db is using by other applications.
My question is can we use the existing rowversion column in place of Version?
Yes, you can use a different column name, just use Automapper to map your existing column to the Version property in ITableData.
Here's a sample that shows how to do it: https://github.com/paulbatum/FieldEngineerLite/tree/master/FieldEngineerLite.Service
I am trying to get to grips with Azure Mobile Services and am a little lost about which Azure services I should be using for what. When you set up a new Azure Mobile Service you only get the option to create it with Microsoft SQL Server as the database. Can you configure it to use the documentDB service instead?
Also a lot of what I read about Azure Mobile Services seem to be setup around storing data for a particular user. Is this the correct place to store data and query it for all the systems users rather than an individual or should that be handled elsewhere?
thanks
Andy
using the .NET backend, you have a choice of using Azure SQL Database,MongoDB or Table Storage. There's no out of the box support yet for DocumentDB, but you can make it work as shown here
what you store in the storage listed above is up to you, there is no specific reason/restriction/limitation that's its only for user specific data. the samples just happen to show that.
You may use any backend database service. It's true you have to set up SQL when you create a new mobile service space. And the SDK has a Table provider that maps to SQL (or MongoDB). However, you can ignore all that if you want. As long as you can access the appropriate driver for your database-of-choice, you can make calls to the database from the API backend methods. This is especially true when building custom API methods.