Cosmos db delete all items - DocumentDB package and click on Install.

 
Execute Stored Procedure then Enter your partition key. . Cosmos db delete all items

viewcount < 10&39; results dbConnection. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . Details This is a convenience function to delete multiple documents from a container. O nce the account is created a new database can be created using the Data Explorer. By default, the Cosmos DB bindings use version 2 of the. requestOptions ItemRequestOptions (Optional) The options for the item request. Set based operations like Insert, Update, Delete are not supported on Azure CosmosDB. viewcount < 10&39; results dbConnection. Jul 29, 2021 Cosmos database supports multi-region (Geo) replication. 27 Jul 2022. This feature is requested and is under review. delete () For instance, if the partition key is the id, then it will just be cosmosClient. This is a very simple Visual Studio app coded in Cdotnet core using the CosmosDB client library to something that is not possible to do otherwise in a simple way delete a set of documents from Azure CosmosDB based on a SELECT query. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. 2018 by Andrey Fedorov. It to delete document db. However when we disable the TTL now again. Daily Developer Blog. That means at the time of deletion in worst case there are two backups available, one for about 4 hours ago and the other for 8 hour ago. The Delete Collection operation deletes an existing collection in a database. In other words, we can write functions to get, put, post, delete heroes, villains. Set based operations like Insert, Update, Delete are not supported on Azure CosmosDB. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. . Got a nice tip from a colleague last week on how to do this. Query SELECT c. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . Optionally, limit the deletion only to documents with this key value. You'll see your databases and each Container listed beneath its database. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . Increment Increasesdecreases by specified value (use negative value to decrease). Unfortunately, there is no way to do a DELETE FROM in Cosmos, at least not yet. A query specifying which documents to delete. CreateDatabaseIfNotExistsAsync ("DatabaseId", 400); await client. Learn more about bidirectional Unicode characters. This includes a POST request to CREATE a Todo item, a GET request to FETCH a list of all Todo items, a PATCH request to update a Todo item, and a DELETE request to delete a ToDoItem. Aug 31, 2021 Azure Cosmos DB Interview Questions. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. All gists Back to GitHub Sign in Sign up Sign in Sign up message Instantly share code, notes, and snippets. you need to give it a few minutes to complete. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. Grouping of items or documents with the same partition key forms a logical partition. It also provides the facility of elastic scale-out of storage & throughout, Comprehensive SLAs. Everything about dev technical. Learn by example is great, this post will show you the examples of cosmos db get all items in container Example 1 cosmos db get all items in containe. Coming to your issue, the easiest option would be via a CosmosDB Stored Procedure. The most important resource is the Item(s). self, , function (err, responseOptions) if (err) throw err; responseBody. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. Unfortunately, there is no way to do a DELETE FROM in Cosmos, at least not yet. Consider these scenarios for example. Query SELECT c. Select Microsoft. Python; Javascript; Linux;. Created Dec 28, 2017. NET SDK. Unfortunately, there is no way to do a DELETE FROM in Cosmos, at least not yet. Tried that bulkDelete today as well, even with the example select, the one mentioned by you and even a simple "SELECT FROM c" does not work. You&39;ll see your databases and each Container listed beneath its database. To review, open the file in an editor that reveals hidden Unicode characters. But be aware that this process takes some time, so if you set "time to live" back to unlimited too soon the documents that haven&39;t been removed yet will reappear. Problem When deleting an item in Cosmosdb it is not conveyed to the. Browse current subscription and connect to the cosmos db. There isn&39;t much on the github. Choose Data Explorer. var isAccepted collection. Cosmos db delete all items pi Fiction Writing Jun 11, 2020 Just pass the item&39;s partition key as the second argument in item () like this cosmosClient. viewcount < 10&39; results. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . Replace the contents of the stored procedure editor with the following JavaScript code javascript. Log In My Account bt. Do the same for item(id, partitionKey). foundedyear 2008"). Oct 31, 2019 I&39;m following the readme and example. This code is working amazingly for reading items from the db, and writing new documents, however I want to be able to delete a single item. Create Cosmos DB databases and modify their settings. The asynchronous Cosmos DB background operation runs using a percentage of user RUs. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. The Azure Cosmos DB SQL API supports the use of. Selecting Azure Cosmos DB will navigate to the Create. CreateDatabaseQuery (). We use 9042542 as TTL in the database. A Cosmos DB container object, as obtained by getcosmoscontainer or createcosmoscontainer. Delete all documens from Cosmos DB Raw delete. That means we don&39;t need a separate SDK to do any bulk operations. Delete all documens from Cosmos DB Raw delete. Python; Javascript; Linux;. ToList (). Azure Cosmos DB takes database administration off your hands with automatic management, updates, and patching as a. You'll see your databases and each Container listed beneath its database. Expand the NutritionDatabase and then select to select the FoodCollection. wj; cv. Increment Increasesdecreases by specified value (use negative value to decrease). azure data factory convert string to json. Coming to your issue, the easiest option would be via a CosmosDB Stored Procedure. azure data factory convert string to json. First of all, what would you do if you accidentally delete a Container According to the documentation "Azure Cosmos DB automatically takes a . Then, Azure Cosmos DB allocates the key space of partition key hashes evenly across the physical partitions. 2 days ago. Replace the contents of the stored procedure editor with the following JavaScript code javascript. viewcount < 10&39; results dbConnection. There are different entities available under Cosmos DB accounts, databases, containers and items. Change this if, for some reason, the default name is taken. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . A simple SQL query like SELECT FROM products will return all items and properties from a container. In our case 9042542 seconds. An example for Bulk Delete is here. It also provides the facility of elastic scale-out of storage & throughout, Comprehensive SLAs. The Delete Document operation deletes an existing document in a collection. getcontainerclient(containername) I noticed that for the partitionkey, you. For more information, see Monitor Azure Cosmos DB with Azure Monitor Cosmos DB insights Azure Monitor. A query specifying which documents to delete. In your case, you could create a stored proc which accepts the document Ids you wish to. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. Starts an asynchronous Cosmos DB background operation which deletes all items in the Container with the specified value. But GroupBy is not supported by Cosmos DB yet. Got a nice tip from a colleague last week on how to do this. Azure Cosmos DB is a globally distributed multi-model database with support for multiple APIs. dr guy massry bad reviews; 40ft container cad; heat transfer reading comprehension worksheet; dekalb county jail ga phone number; ek villain movie download hd 720p with english subtitles. Daily Developer Blog. Nov 02, 2021 Remove Deletes an existing element. Get started. Javascript; C Language; Javascript; Python; PHP; Redis. This document db will delete all its cosmos db using. By uploading a simple document and setting all input values to 1 (create, read, update, delete) we can see which operations are relatively more . Choose Data Explorer. Microsoft announced that we can do any bulk operations with Net SDK 3. This feature is requested and is under review. partitionKey PartitionKey. viewcount < 10&39; results dbConnection. Meaning that if you want to use new V3 features such as Transaction Batches in. It will iterate all documents in the collection and delete them one at a time. Sep 16, 2020 According to the documentation "Azure Cosmos DB automatically takes a backup of your data for every 4 hours and at any point of time, the latest two backups are stored". item(id, id). doesn&x27;t work. To delete a Container in the Azure Portal, do the following In the left menu within the portal, choose All resources -> then choose your Cosmos DB resource to bring up the Cosmos. If Yes, then there is a way but it's very expensive and slow. cosmos-db-delete-readall. When testing my Cosmos database I often like to reset the containers, or in other words, delete all the existing documents. There isn&39;t much on the github. The first thing we need to do is install the CosmosDB nuget package. Accept Reject. In other words, we can write functions to get, put, post, delete heroes, villains. To review, open the file in an editor that reveals hidden Unicode characters. There is built in mechanism in Cosmos DB SQL API which will take care of expired data called Time to Live. OracleSQL; Programing Language. Hope this has helped. Javascript; C Language; Javascript; Python; PHP; Redis. In our case 9042542 seconds. Do the same for item(id, partitionKey). Sample solutions that do CRUD operations and other common operations on Azure Cosmos DB resources are included in the azure-documentdb-python GitHub repository. you need to give it a few minutes to complete. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. The partition design is dependent on the. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. net SDK to read data from Cosmos DB. Set up Azure Cosmos DB andor use the emulator. Delete item. This function is not meant for production use. There&39;s no obvious way to do it from the portal without doing it one by one or deleting and recreating the container BUT if we set the TTL (TIME TO LIVE) property on a containers items to 1 second Cosmos will begin deleting all the items . query A query specifying which documents to delete. That means at the time of deletion in worst case there are two backups available, one for about 4 hours ago and the other for 8 hour ago. OracleSQL; Programing Language. That&39;s because SQL query language in Cosmos DB is only for reading. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. Specifies deletion criteria using query operators. Choose the container you want to delete. options CosmosItemRequestOptions the options. This feature is requested and is under review. It to delete document db. For more information, see Monitor Azure Cosmos DB with Azure Monitor Cosmos DB insights Azure Monitor. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. self FROM c. There is no direct way how to remove a bunch of records from Cosmos DB. If your intention is to restrict the user to insert, update or delete items then you can assign "Cosmos DB Account Reader Role" built in role to the user and the user won't be able to perform any insertdeleteupdate operations on your containercontainer items. Microsoft has marked all these requested Cosmos DB features as . Delete all documens from Cosmos DB Raw delete. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. Aug 31, 2021 Azure Cosmos DB Interview Questions. However, keep in mind TTL doesn&39;t come for free, Cosmos DB will use left-over RU&39;s in background for deleting records. 22 Jun 2022. Add the following JavaScript Code. From within the Cosmos DB resource blade, select on the Data Explorer link on the left. The Azure Cosmos DB SQL API supports the use of. Starts an asynchronous Cosmos DB background operation which deletes all items in the Container with the specified value. A Cosmos DB container object, as obtained by getcosmoscontainer or createcosmoscontainer. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. Value The number of rows deleted. So this SP will work with choosing the appropriate Partition Key. ItemResponse<T>> DeleteItemAsync<T> (string id, Microsoft. Create Bulk Upload and Bulk Delete Stored Procedures. The first thing we need to do is install the CosmosDB nuget package. Queries related to "read all items from cosmos container" cosmos db get all items in container; cosmos db get all items C; cosmos db get all items; read all items from cosmos container; c cosmos db add items into container; add item to cosmos db c. You could consider upvoting for it here. Name your Flow with an appropriate meaning. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. In case you are not able to find it, then you should search for Cosmos and under that you will be able to select the Delete a document step as. By uploading a simple document and setting all input values to 1 (create, read, update, delete) we can see which operations are relatively more . Delete all documens from Cosmos DB Raw delete. Here is the screen shot The result for the same will display 2 items have been deleted and the item will also show the two items with zipcode 22 is deleted. OracleSQL; Programing Language. You could consider upvoting for it here. Dec 17, 2020 JOINs in Azure Cosmos DB are different from JOINs in relational databases. Please let me know if you have further questions. options CosmosItemRequestOptions the options. Daily Developer Blog. NET Project or Resource in Azure. To delete a Container in the Azure Portal, do the following In the left menu within the portal, choose All resources -> then choose your Cosmos DB resource to bring up the Cosmos DB management blade. An example for Bulk Delete is here. Change this if, for some reason, the default name is taken. Add the following JavaScript Code. For example, heres a query that JOINs the gifts array with the rest of the item. Created Dec 28, 2017. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. As you can see, the delete. Azure Cosmos DB - DeleteBackup documents by Query. 14 May 2022. In my case I used the following names Database id dbtodos; Container id items ; Partition key all; Go to the Data Explorer section on the left menum to insert a new. Grouping of items or documents with the same partition key forms a logical partition. Remedy 2 Soft delete the item as above. Coming to your issue, the easiest option would be via a CosmosDB Stored Procedure. Choose Data Explorer. deleteitem(documentid) You can navigate to Cosmos DB. Sep 09, 2021 Configure Azure Cosmos DB. Feb 16, 2019 The line of code that gives them to me with Cosmos DB SDK is simply this container. The most important resource is the Item(s). Object >. Selecting Azure Cosmos DB will navigate to the Create. Queries related to cosmos db get all items in container cosmos db get all items in container; read all items from cosmos container; cosmos db get all items;. Enter &x27;Database ID&x27;, &x27;Collection ID&x27;, &x27;Sproc ID&x27;, &x27;Partition key value&x27;, &x27;parameters&x27; Add a new step "Response" request action and add. CreateDatabaseQuery (). Daily Developer Blog. This gets more expensive and slower as the container scales up. I get the error Entity with the specified id does not exist in the system The id does in fact exist checking in both Azure data explorer as well as the response from Get All Documents (V3). Step 1. Add a new folder to the application and give it a name as StoredProcedure. Next we need to model our data as a C class. 13 Aug 2017. Choose the container. Accept Reject. May 02, 2020 For the purpose of this demo, we are going to use the basic C API to createread items. delete(); console. It works by creating a stored procedure and then calling it with the supplied . Posted on 20. Scenarios to use Cosmos Table API. Get started. deleteitem(documentid) You can navigate to Cosmos DB. dr guy massry bad reviews; 40ft container cad; heat transfer reading comprehension worksheet; dekalb county jail ga phone number; ek villain movie download hd 720p with english subtitles. Nov 02, 2019 Set based operations like Insert, Update, Delete are not supported on Azure CosmosDB. Optionally, limit the deletion only to documents with this key value. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. To review, open the file in an editor that reveals hidden Unicode characters. Everything about dev technical. which will list the output of all documents in the collection. CreateDatabaseIfNotExistsAsync ("DatabaseId", 400); await client. Bulk delete proc expects the query which gives it the bulk documents to delete from. Daily Developer Blog. Expand the NutritionDatabase and then select to select the FoodCollection. Choose the container you want to delete. js deletAll which will remove all documents in the . item (id, partitionKey). The containers are logical resources that groups one or more physical partitions of the data and necessary building blocks of Cosmos DB structure. 4 days ago. This feature is requested and is under review. There is no direct way how to remove a bunch of records from Cosmos DB. NET Project or Resource in Azure. I know I could create a Console Application or Azure Function to do this, but I was hoping not create another. Java public CosmosItemResponse<Object> deleteAllItemsByPartitionKey(PartitionKey partitionKey, CosmosItemRequestOptions options) Parameters. geckolib minecraft, semo rentals

You&39;ll see your databases and each Container listed beneath its database. . Cosmos db delete all items

The DeleteItemAsync method deletes an item within the Cosmos DB Container. . Cosmos db delete all items black metal font

2 Feb 2020. You&39;ll see your databases and each Container listed beneath its database. The partition design is dependent on the. io page on the partition key either. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. Sample solutions that perform CRUD operations and other common operations on Azure Cosmos DB resources are included in the azure-cosmos-js GitHub repository. . OracleSQL; Programing Language. OracleSQL; Programing Language. Got a nice tip from a colleague last week on how to do this. This feature is requested and is under review. Query SELECT c. Add a New step. item (id, partitionKey). I couldn't delete it. Everything about dev technical. For more information, see Create an Azure Cosmos account, database, and container from the Azure portal. Lets say youre. Python; Javascript; Linux;. A query specifying which documents to delete. Do the same for item(id, partitionKey). When testing my Cosmos database I often like to reset the containers, or in other words, delete all the existing documents. foundedyear 2008"). Javascript; C Language; Javascript; Python; PHP; Redis. All the information above and more can be viewed using Insights for Azure Cosmos DB. JSON allows for nested nodes, arrays and arrays of objects, and Cosmos DB SQL can handle all of these when reshaping the output data. In your case, you could create a stored proc which accepts the document Ids you wish to. To deletea Container in the Azure Portal, do the following In the left menu within the portal, choose Allresources -> then choose your Cosmos DBresource to bring up the CosmosDBmanagement blade. Next we need to model our data as a C class. Apr 22, 2021 The Delete Collection operation deletes an existing collection in a database. A query specifying which documents to delete. To delete a Container in the Azure Portal, do the following In the left menu within the portal, choose All resources -> then choose your Cosmos DB resource to bring upthe Cosmos DB management blade. An example for Bulk Delete is here. Grouping of items or documents with the same partition key forms a logical partition. To review, open the file in an editor that reveals hidden Unicode characters. Everything about dev technical. Specifies deletion criteria using query operators. Add a new step, Delete a document, which will get all the rows from the Cosmos DB. js This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. The delete by partition key feature is an asynchronous, background operation that allows you to delete all documents with the same logical partition key value, using the Comsos SDK. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. Logical Partitions in Cosmos DB. Request Headers See Common Azure Cosmos DB REST request headers for headers that are used by all Cosmos DB requests. Using Cosmosdb SDK. This code is working amazingly for reading items from the db, and writing new documents, however I want to be able to delete a single item. I have searched a fair few places now, many people say to use DocumentDB DocumentClient. For example, heres a query that JOINs the gifts array with the rest of the item. 16 Sept 2020. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. We use 9042542 as TTL in the database. Revisions 1. options CosmosItemRequestOptions the options. This article covers the SQL API for Azure Cosmos DB. Name your Flow with an appropriate meaning. In this case you have to group the data by the attribute you want to find the duplicate and delete the old records from that group. The Azure Cosmos DB SQL API supports the use of. You should create a stored procedure bulkDeleteSproc. The Azure Cosmos DB SQL API supports the use of Structured Query Language (SQL) to perform queries on items in containers. delete(); console. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. An example for Bulk Delete is here. Learn more about bidirectional Unicode characters. SQL API This supports JSON documents and SQL-based queries. Go to the Cosmos DB account. 17 Aug 2019. Power Automate to delete data from Cosmos DB. Required, document. dr guy massry bad reviews; 40ft container cad; heat transfer reading comprehension worksheet; dekalb county jail ga phone number; ek villain movie download hd 720p with english subtitles. The partition design is dependent on the. Delete a item from the Azure Cosmos service as an asynchronous operation. This is a very simple Visual Studio app coded in Cdotnet core using the CosmosDB client library to something that is not possible to do otherwise in a simple way delete a set of documents from Azure CosmosDB based on a SELECT query. 14 May 2022. Dec 17, 2020 JOINs in Azure Cosmos DB are different from JOINs in relational databases. Reading all items. With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. Required, document. However we can create a stored procedure as mentioned in the below link and then by executing the procedure we can delete the documents scoped to a partition key Then just execute the procedure as mentioned with parameters. csx hosted with by GitHub Replace the values of YOURCONTAINER and YOURPARTITIONKEY with the appropriate values, e. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. Please let me know if you have further questions. I have searched a fair few places now, many people say to use DocumentDB DocumentClient. Microsoft has marked all these requested Cosmos DB features as . viewcount < 10&39; results dbConnection. ConnectionDeviceId "VariablSpeedDrivesSimulatortest". Sample solutions that do CRUD operations and other common operations on Azure Cosmos DB resources are included in the azure-documentdb-python GitHub repository. viewcount < 10&39; results dbConnection. queryitem(query) for item in results documentid item&39;id&39; dbConnection. Choose the container. Understand data explorer, create document database from data explorer, insert dummy data and use. As a consumer of Azure Cosmos DB, you can choose how to partition your data. Do the same for item(id, partitionKey). This is a pre-created Azure Monitor Workbook that brings all these metrics together. I didn't find any. This is a pre-created Azure Monitor Workbook that brings all these metrics together. item (id, partitionKey). This code is working amazingly for reading items from the db, and writing new documents, however I want to be able to delete a single item. dr guy massry bad reviews; 40ft container cad; heat transfer reading comprehension worksheet; dekalb county jail ga phone number; ek villain movie download hd 720p with english subtitles. Value The number of rows deleted. foundedyear 2008"). With the data plane API you can configure basic options such as indexing policy, partition keys much like you can with Cosmos DB SDKs. Choose Data Explorer. Javascript; C Language; Javascript; Python; PHP; Redis. Coming to your issue, the easiest option would be via a CosmosDB Stored Procedure. The Cosmos item id. Unfortunately, there is no way to do a DELETE FROM in Cosmos, at least not yet. By default, Azure Cosmos DB automatically indexes every property for all items in your container without the need to define any schema or configure secondary indexes. id, t AS gift FROM c JOIN t IN c. Add a new step, Delete a document, which will get all the rows from the Cosmos DB. Jul 29, 2021 Cosmos database supports multi-region (Geo) replication. Once it is found you can get the PK value and delete the item. Links to the related API reference content. By default, the Cosmos DB bindings use version 2 of the. Create a new console app. A Cosmos DB container object, as obtained by getcosmoscontainer or createcosmoscontainer. Grouping of items or documents with the same partition key forms a logical partition. item (id, id). This feature is requested and is under review. Azure Cosmos DB is a globally distributed multi-model database with support for multiple APIs. To delete items from a container, use ContainerProxy. Python; Javascript; Linux;. To delete a Container in the Azure Portal, do the following In the left menu within the portal, choose All resources -> then choose your Cosmos DB resource to bring upthe Cosmos DB management blade. To confirm, the API returns a . Python; Javascript; Linux;. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query &39;SELECT FROM c WHERE c. The Cosmos item id. In the left menu within the portal, choose All resources -> then choose your Cosmos DB resource to bring up the Cosmos DB management blade. Nov 20, 2018 How to remove records from Cosmos DB. OracleSQL; Programing Language. Finally, to remove a specific item call deleteitem() method and supply it with the unique item id Delete selected items using custom query query 'SELECT FROM c WHERE c. . no route to host socket