Skip to content

Commit

Permalink
[Purview] Regenerate Catalog Client (#21008)
Browse files Browse the repository at this point in the history
* [Purview Catalog] Regenerate Based on Arch Board Feedback

* [Purview Catalog] Reduce number of top level clients

* [Purview] Snap Catalog to latest Swagger

* [Purview Catalog] Update README.md and CHANGELOG.md
  • Loading branch information
ellismg authored May 12, 2021
1 parent 2be22f9 commit b59fda0
Show file tree
Hide file tree
Showing 16 changed files with 1,038 additions and 1,822 deletions.
7 changes: 5 additions & 2 deletions sdk/purview/Azure.Analytics.Purview.Catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History

## 1.0.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2021-05-12)

### New Features

- Initial preview release of the Azure Purview Catalog client library for .NET

- Initial Preview Release
70 changes: 59 additions & 11 deletions sdk/purview/Azure.Analytics.Purview.Catalog/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
# Azure Purview Catalog client library for .NET

**Introduction**:
Azure Purview Catalog is a fully managed cloud service whose users can discover the data sources they need and understand the data sources they find. At the same time, Data Catalog helps organizations get more value from their existing investments.

TODO
- Search for data using technical or business terms
- Browse associated technical, business, semantic, and operational metadata
- Identify the sensitivity level of data.

## Getting started
**Please rely heavily on the [service's documentation][catalog_product_documentation] and our [protocol client docs][protocol_client_quickstart] to use this library**

[Source code][source_code] | [Package (NuGet)][client_nuget_package] | [Product documentation][catalog_product_documentation]

TODO
## Getting started

### Install the package

TODO
Install the Azure Purview Catalog client library for .NET with [NuGet][client_nuget_package]:

```
dotnet add package Azure.Analysis.Purview.Catalog --prerelease
```

### Prerequisites

TODO
- You must have an [Azure subscription][azure_subscription] and a [Purview resource][purview_resource] to use this package.

### Authenticate the client

TODO
#### Using Azure Active Directory

This document demonstrates using [DefaultAzureCredential][default_cred_ref] to authenticate via Azure Active Directory. However, any of the credentials offered by the [Azure.Identity][azure_identity] will be accepted. See the [Azure.Identity][azure_identity] documentation for more information about other credentials.

Once you have chosen and configured your credential, you can create instances of the `PurviewCatalogClient`.

```C#
var credential = new DefaultAzureCredential();
var client = new PurviewCatalogClient(new Url("https://<my-account-name>.catalog.purview.azure.com"), credential);
```

## Key concepts

TODO
### Protocol Methods

Operations exposed by the Purview Catalog SDK for .NET use *protocol methods* to expose the underlying REST operations. You can learn more about how to use SDK Clients which use protocol methods in our [documentation][protocol_client_quickstart].

### Thread safety

Expand All @@ -41,15 +60,35 @@ We guarantee that all client instance methods are thread-safe and independent of

## Examples

TODO
The following section shows you how to initialize and authenticate your client, then get all of the type definitions in the catalog.

### Get All Type Definitions

```C#
var credential = new DefaultAzureCredential();
var client = new PurviewCatalogClient(new Uri("https://<my-account-name>.catalog.purview.azure.com"), credential);

var response = await client.Types.GetAllTypeDefinitionsAsync();
var responseDocument = JsonDocument.Parse(response.Content);
Console.WriteLine(responseDocument.RootElement.GetProperty("entityDefs"));
```

## Troubleshooting

TODO
### Setting up console logging
The simplest way to see the logs is to enable the console logging.
To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method.

```C#
// Setup a listener to monitor logged events.
using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();
```

To learn more about other logging mechanisms see [here][azure_core_diagnostics].

## Next steps

TODO
This client SDK exposes operations using *protocol methods*, you can learn more about how to use SDK Clients which use protocol methods in our [documentation][protocol_client_quickstart].

## Contributing

Expand All @@ -62,6 +101,15 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [[email protected]][coc_contact] with any additional questions or comments.

<!-- LINKS -->
[source_code]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/purview/Azure.Analytics.Purview.Catalog/src
[client_nuget_package]: https://www.nuget.org/packages?q=Azure.Analytics.Purview.Catalog
[catalog_product_documentation]: https://azure.microsoft.com/services/purview/
[azure_identity]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/identity/Azure.Identity
[protocol_client_quickstart]: https://aka.ms/azsdk/net/protocol/quickstart
[default_cred_ref]: https://docs.microsoft.com/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet
[azure_subscription]: https://azure.microsoft.com/free/
[purview_resource]: https://docs.microsoft.com/azure/purview/create-catalog-portal
[azure_core_diagnostics]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Diagnostics.md
[cla]: https://cla.microsoft.com
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
Expand Down
Loading

0 comments on commit b59fda0

Please sign in to comment.