SDS Explorer

[This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release. This document is provided for informational purposes only.]

SDS Explorer is a general purpose data manipulation tool for use with Microsoft® SQL Data Services (SDS). The tool provides a graphical interface to explore SDS without having to write any code. It supports POST (create), PUT (update), GET (retrieve), DELETE, and Query operations.

In this release SDS Explorer does not support backup/restore and blob operations. However, SDS command line tool provides this functionality. For more information, see SDS Command Line Tool.

Cc752965.2b843e77-4fba-4620-8227-5a93a9b80dff(en-us,SQL.100).gif

As shown in the diagram, the graphical interface has following components:

  • Address Bar
  • Query box
  • List of Action buttons (Get, Delete, Create, Update, Query)
  • List of Template buttons (Authority, Container, Entity, Blob)
  • List of Add Prop buttons (String, Decimal, DateTime, Boolean, Binary)
  • Menu bar (File, View and Help)

Address Bar

When you start the SDS Explorer, the Address Bar shows the service URI (https://data.database.windows.net/v1/) indicating the service is in scope. For more information about scope, see Querying SQL Data Services. .

Actions

The tool supports REST operations: GET, Query, POST (create), PUT (update), and DELETE. The UI shows a button for each of these operations.

Get

The GET operation retrieves a single flexible entity. The entity returned depends on the scope specified in the Address Bar:

  • If an authority is in scope (for example, https://<authority-id>.data.database.windows.net/v1/), the GET operation returns the specific authority metadata.
  • If a container is in scope (for example, https://<authority-id>.data.database.windows.net/v1/<container-id>), the GET operation returns the specific container metadata.
  • If an entity is in scope (for example, https://<authority-id>.data.database.windows.net/v1/<container-id>/<entity-id>), the GET operation returns the specific entity.
    For blob entities, the Get button drop down provides options to get the blob entity (only metadata) or the blob itself. If you choose to retrieve the blob itself, a file dialog opens allowing user to select a folder and file name where the retrieved blob is saved. The content-disposition metadata attribute provides the default file name. User can specify any file name to store the blob.

Query

Querying involves the following steps:

  1. Specify appropriate scope in the Address Bar.
    • If an authority is in scope, query returns container metadata for all containers satisfying the query.
    • If a container is in scope, the query returns entities satisfying the query. For blob entities, the query returns only the blob metadata. The Get operation should be used to retrieve one blob at a time.
  2. Specify query in the Query box.
  3. Press the Query button.

For additional information on queries, see Querying SQL Data Services.

Create

To create (POST) a flexible entity (Authority, Container or an Entity) an XML payload describing the entity is needed. The tool provides necessary XML templates making it easy to define the XML payload. Pressing one of the Template buttons displays the XML in the editor window.

The Property buttons are useful when adding flexible properties (user-defined properties) to the entity being created or updated. There is a property button for each data type supported in SDS. These buttons add a new property, with a generic name and value, to the XML template in the editor. You will need to update the XML and provide an appropriate property name and value.

The Content property button is useful when working with blobs. When creating a blob entity, the Blob button provides the following default template:

<s:Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:s="https://schemas.microsoft.com/sitka/2008/03/">
  <s:Id>SomeGUIDId</s:Id>
  <s:Content />
</s:Entity>

This template has an empty <Content/> element. In this case the tool computes the values of the <Content/> metadata attributes (content-disposition, content-type, content-length) from the input blob. After the blob is created, if you retrieve (Get) the blob, you can see the computed metadata attribute values as shown in the following sample blob entity:

<s:Entity xmlns:s="https://schemas.microsoft.com/sitka/2008/03/"
               xmlns:x="http://www.w3.org/2001/XMLSchema" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <s:Id>SomeJPEGImage</s:Id>
  <s:Version>1030835</s:Version>
  <s:Content content-type="image/jpeg" content-length="1723" content-disposition="inline; filename=SampleImage.jpg" />
</s:Entity>

You can optionally provide these metadata attribute values. After selecting the Blob template, press the Content button. It adds these attributes to the <Content> template. User can then provide values for these attributes.

Update

The update (PUT) action can be used to update an entity. Only user-defined properties can be added, updated or deleted. Metadata property updates are not supported. Therefore, the authority and container entities cannot be updated because they only have metadata properties. Also, blob entities have only metadata properties and they cannot be updated. However, blob itself can be updated (replaced).

Delete

You can delete a container or an entity. When a container is deleted, all the entities in that container are also deleted. Authority deletion is not supported. To delete a container or an entity:

  1. Ensure Address Bar specifies appropriate scope.
  2. Press the Delete button.

Arrow Expander

The triangle next to the Request-Response text at the bottom of the UI can be used to show or hide HTTP Request and Response information for any of these operations. By default, this information is hidden. You can resize the ratio between the main XML content area and the HTTP request/response area by using the splitter directly on top of this drop down.

File and View Menus

The File menu has Connection Info, Save and Load options. The Connection Info menu option allows you to change credentials (user name and password) without closing the SSDS Explorer session. The Save and Load menu choices allow user to save the XML in the editor window or retrieve XML from a file into the editor window.

Examples

Example 1. Create an authority

The following steps create an authority.

  1. Ensure the Address Bar shows service scope (https://data.database.windows.net/v1/).
  2. Press the Authority template button. Skeleton XML payload appears in the editor window.
  3. Provide authority Id value in the XML payload. As user enters the authority id, the Address Bar updates and shows that authority id in the URI.
  4. Press the Create button.

Example 2. Create a container

The following steps create a container within the specified authority.

  1. Ensure the Address Bar shows appropriate authority scope. For example, https://<authority-id>.data.database.windows.net/v1/.
  2. Press the Container template button to display skeleton XML in the editor window.
  3. Provide Id value for the container in the XML Payload. As user enters container id, the Address Bar URI updates.
  4. Press the Create button.

Example 3. Create an entity

The following steps create an entity within a specified container.

  1. Ensure the Address Bar shows appropriate container scope. For example, https://<authority-id>.data.database.windows.net/v1/<container-id>.
  2. Press the Entity template button to show the skeleton XML payload in the editor window.
  3. Provide Id value for the entity in the XML Payload. As user enters the entity id, the Address Bar URI updates showing the entity id.
  4. Add optional user-defined properties:
    1. Press appropriate Property type button to add a user-defined property of specific type.
    2. Specify property name and value. Specify property name by changing the start and end XML tag values.
  5. Press the Create button.

Example 4. Query service to retrieve metadata for all your authorities

To find a list of all the user has created authorities, the user need to send a query with the service in scope.

  1. Ensure the Address Bar shows service scope (https://data.database.windows.net/v1/).

  2. Enter the following query in the Query box

    from e in entities select e
    
  3. Press the Query button.

Example 5. Query an authority to retrieve metadata for all containers within it

The following steps query a specific authority. The query returns metadata for all the containers within the authority.

  1. Specify authority scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/.

  2. Enter the following query in the Query box

    from e in entities select e
    
  3. Press the Query button.

Example 6. Get an authority

To retrieve (Get) metadata for a specific authority:

  1. Specify an authority scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/.
  2. Press the Get button.

Example 7. Get a container

To retrieve (Get) metadata for a specific container:

  1. Specify a container scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/<container-id>.
  2. Press the Get button.

Example 8. Get an entity

The retrieve (Get) an entity:

  1. Specify an entity scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/<container-id>/<entity-id>.
  2. Press the Get button.

Example 9. Update an entity

When user presses the Update button, the XML payload in the editor window replaces the corresponding entity in the service. The example steps given below first retrieve an entity, update its user-defined properties and send the update back to the service.

  1. Specify an existing entity URI in the Address Bar. It is the entity that you wish to update. shows specific entity scope (https://<authority-id>.data.database.windows.net/v1/<container-id>/<entity-id>).
  2. Press the Get button.
  3. Update user-defined properties as follows:
    • Update an existing user-defined properties
    • Delete a user-defined properties.
    • Add new user-defined properties using the Property buttons of appropriate type.
  4. Press the Update button to send the updated entity payload back to the service.
Cc752965.note(en-us,SQL.100).gif
A query against a container returns an <EntitySet>. To update one of the entities in this set hold down the control key and press the left mouse button on the entity. Only the selected entity remains in the editor window that can be updated. For related keyboard shortcuts, see Keyboard Shortcuts for SSDS Explorer.

Example 10. Delete an entity

To delete an entity, the entity being deleted must be in scope,

  1. Specify the entity scope in the Address Bar. For example,(https://<authority-id>.data.database.windows.net/v1/<container-id>/<entity-id>).
  2. Press the Delete button.

Example 11. Delete a container

When a container is deleted, all the entities within it are also deleted. To delete a specific container:

  1. Specify the container scope in the Address Bar For example, https://<authority-id>.data.database.windows.net/v1/<container-id>.
  2. Press the Delete button.

Example 12. Delete an authority

Authority deletion is not supported in this release.

Example 13. Create a blob entity

The following steps create a blob entity within a container.

  1. Specify a container scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/<container-id>. This is the container where the new blob entity will be stored.
  2. Press the Blob template button. Skeleton XML payload appears in the editor window.
  3. Provide Id value for the blob entity in the XML Payload. As user enters the entity id value, the Address Bar URI updates showing the entity id.
  4. Leave the <Content /> tag empty. For this example, the tool computes the <Content> metadata attribute (content-type, content-length, and content-disposition). To optionally specify these attribute values, press the Content button which adds these attributes to the XML template. User can then specify values for these attributes. Note that the content-length is a read-only attribute.
  5. Press the Create button.
  6. In the file dialog, select the blob file and press Open to upload the blob.

Example 14. Update a blob

The blob update operation replaces the entire blob stored in SDS. The tool opens the file dialog for the user to specify replacement blob.

  1. Specify the blob entity scope in the Address Bar. For example, https://<authority-id>.data.database.windows.net/v1/<container-id>/<blob-entity-id>.
  2. Press the Update button.
  3. In the file dialog, select the file.

See Also

Concepts

SQL Data Services (SDS) SDK