Releases: wjohnson/pyapacheatlas
0.16.0
Release Notes
New Features
- Support the Microsoft Purview GraphQL endpoint ( #265 )
- Support providing
infovalues for experts / owners in Microsoft Purview when parsing the Excel bulk entities tab. ( #264 )- Achieved by following the same pattern as Microsoft Purview follows in their term upload which is
emailaddress:info value - Where
info valueis the string of text you want in the info field.
- Achieved by following the same pattern as Microsoft Purview follows in their term upload which is
- Added two
update_entity_tagsanddelete_entity_tagsto the PurviewClient ( #245 )- These are thin wrappers over
update_entity_labelsanddelete_entity_labelsto reduce the confusion for MS Purview users. - MS Purview calls
labelsastagsin the MS Purview UI.
- These are thin wrappers over
AtlasClient.addRelationshipnow supports adding a list of Atlas Entities that will automatically be converted to the minimum JSON necessary for use in the/entityand/entity/bulkendpoints.
Bug Fixes
Breaking Changes
- None
Other Changes
- None
Full Changelog: 0.15.0...0.16.0
0.15.0
Release Notes
New Features
- Support Business / Managed Attributes in Excel.
- You can include them with a column header of
[Business][typeName] attributeNameor
[Managed][groupName] attributeName. Both are valid since Atlas would call it BusinessMetadata
but Purview calls it Managed attributes
- You can include them with a column header of
- Support Updates to Glossary Term
Bug Fixes
- get_term when get_glossary would error out if returning an empty result
Breaking Changes
- None
Other Changes
- Removed support for Python 3.6
Full Changelog: 0.14.0...0.15.0
0.14.0
Release Notes
This release mainly improves things internally and makes the package easier to manage and explore.
New Features
- Support Delete an Entity by Unique Attributes by @wjohnson in #218
- Supports
create_or_update_collectionin the catalog dataplane withPurviewClient.collections
Bug Fixes
- None
Breaking Changes
- None
Other Changes
- Update user agent to include "pyapacheatlas" by @sonnyhcl in #214
- Update from legacy Purview API endpoints and api versions by @wjohnson in #217
- Updated docs to use pydata theme and structure by @wjohnson in #219
- Cleaning up code for flake8 by @wjohnson in #220
New Contributors
Full Changelog: 0.13.0...0.14.0
0.13.1
0.13.0
Release Notes
This release adds support for collections in Purview and fixes a bug in discovery.search_entities
Some great contributions from @fpvmorais , @vincentk , and@xiaoyongzhu since the last release.
New Features
- Support the core collections APIs:
collections.upload_single_entitylets you create a single entity with a specific collection id.collections.upload_entitieslets you create multiple entities with a specific collection id.collections.move_entitieslets you move a list of guids to a specific collection based on collection id.collections.list_collectionslets you list all of the collections so you can find the friendly name and id.
Please note that collection id is required in the upload and move methods which is NOT the friendly name. Use the list_collections method to get the id of your collection.
Bug Fixes
discovery.search_entitieswas calling the search api an extra time if the results were already small
Breaking Changes
- None
0.12.0
Release Notes
This release completes support for Apache Atlas 2.2 supported features in Azure Purview.
New Features
Business Metadata
- Deleting a specific business attribute from an entity
resp = client.delete_businessMetadata(
guid="f222242b-e304-4123-9747-47f6f6f60000",
businessMetadata={"operations":{"expenseCode":""}}
)
print(resp)- Add Business Metadata to an Existing Entity
resp = client.update_businessMetadata(
guid="f222242b-e304-4123-9747-47f6f6f60000",
businessMetadata={
"operations":{"expenseCode":"1011"}
}
)
print(resp)Highlighting Existing Features for Atlas 2.2 Support
Business Metadata
- Creating a BusinessMetadata typedef
from pyapacheatlas.core.typedef import AtlasAttributeDef, AtlasStructDef, TypeCategory
bizdef = AtlasStructDef(
name="operations",
category=TypeCategory.BUSINESSMETADATA,
attributeDefs=[
AtlasAttributeDef(name="expenseCode",options={"maxStrLength": "500","applicableEntityTypes":"[\"DataSet\"]"}),
AtlasAttributeDef(name="criticality",options={"maxStrLength": "500", "applicableEntityTypes":"[\"DataSet\"]"})
]
)
resp = client.upload_typedefs(businessMetadataDefs=[bizdef])
print(resp)- Add Business Metadata to a New Entity
entity = AtlasEntity(
name="mytable",
typeName="azure_sql_table",
qualified_name="mssql://myserver/mydb/myschema/mytable",
guid="-1"
)
entity.addBusinessAttribute(operations={"expenseCode":"123", "criticality":"low"})
resp = client.upload_entities([entity])
print(resp)Custom Attributes
- Add a Custom Attribute to a New Entity
entity = AtlasEntity(
name="mycustomtable",
typeName="azure_sql_table",
qualified_name="mssql://myserver/mydb/myschema/mycustomtable",
guid="-1"
)
entity.addCustomAttribute(foo="bar", buz="qux")
resp = client.upload_entities([entity])
print(resp)- Add a Custom Attribute to an Existing Entity
- This really stinks because you are using the /entity endpoint and must specify all required attributes.
- You may consider using a
client.get_single_entityfor a given entity and extract the existing custom attributes.
existing_entity = AtlasEntity( name="mycustomtable", typeName="azure_sql_table", qualified_name="mssql://myserver/mydb/myschema/mycustomtable", guid="-1" ) # Note that we've changed foo to baz which will update foo and we still specify buz to keep it around existing_entity.addCustomAttribute(foo="baz", buz="qux") resp = client.upload_entities([existing_entity]) print(resp)
- Delete a Custom Attribute from an Existing Entity
- See comments above, you're just updating the entity without the or any of the custom attributes.
existing_entity = AtlasEntity( name="mycustomtable", typeName="azure_sql_table", qualified_name="mssql://myserver/mydb/myschema/mycustomtable", guid="-1" ) # Note we've omitted the foo attribute meaning we will delete it existing_entity.addCustomAttribute(buz="qux") resp = client.upload_entities([existing_entity]) print(resp)
Custom Labels
- Add Custom Labels to a New Entity
entity = AtlasEntity(
name="mylabeledtable",
typeName="azure_sql_table",
qualified_name="mssql://myserver/mydb/myschema/mylabeledtable",
guid="-1",
labels= ["a", "b", "c"]
)
resp = client.upload_entities([entity])
print(resp)- Append new custom labels (without overwriting)
resp = client.update_entity_labels(labels=['d','e'],
guid="57b23112-d665-44c5-afb0-b4f6f6f60000",
force_update=False
)
print(resp)- Completely overwrite custom labels with a new set of labels
resp = client.update_entity_labels(labels=['j','k', 'l'],
guid="57b23112-d665-44c5-afb0-b4f6f6f60000",
force_update=True
)
print(resp)- Remove one or many Custom Labels
resp = client.delete_entity_labels(labels=['j','k'],
guid="57b23112-d665-44c5-afb0-b4f6f6f60000",
force_update=True
)
print(resp)Bug Fixes
- An error was occuring when using
upload_typedefsand theforce_update=Trueflag was set.
Breaking Changes
- An internal method
_get_typedefs_headermodified its response for busienss_metadataDefs to businessMetadataDefs.
0.11.0
New Features
- Enable passing arguments to the underlying requests package. This supports #181 by enabling a configuration such as:
client = PurviewClient(
purview_name="myservicename",
authentication=cred,
requests_verify=False
)- The
search_entitiesmethod now accepts abodyparameter which acts like thebodyin thequerymethod. (#184)
Breaking Changes
- Deprecated TablesLineage and FineGrainColumnLineage from the Excel template. To reenable these tabs, pass
--include-deprecatedto thepyapacheatlas -m --make-template path.xlsxcommand orinclude_deprecated=Trueto themake_template()method (#188)
Bug Fixes
- The Excel sheet was failing when only
ownerswas provided andexpertswas omitted. Theownerscolumn can now be specified by itself and the ExcelReader can properly parse the column. (#183) - When defining an
AtlasAttributeDefyou can now pass in any of theCardinalityenum options and theAtlasAttributeDefwill extract the enum value automatically (#185).
0.10.0
New Features
- Added support for Purview's DiscoveryREST API endpoints
Breaking Changes
- PurviewClient.search_entities is now deprecated. Please migrate to PurviewClient.discover.search_entities.
0.9.1
Bug Fixes
GlossaryClient.assignTermincorrectly referencedget_glossary_termwhen using termName.GlossaryClient.delete_assignedTermincorrectly referencedget_glossary_termwhen using termName.GlossaryClient.get_termAssignedEntitiesincorrectly referencedget_glossary_termwhen using termName.
Minor Changes
GlossaryClient.assignTermnow supports passing in a glossary_guid to speed up operations when using termName.GlossaryClient.delete_assignedTermnow supports passing in a glossary_guid to speed up operations when using termName.GlossaryClient.get_termAssignedEntitiesnow supports passing in a glossary_guid to speed up operations when using termName.
0.9.0
New Features
MS Graph and Helping to Support Expert and Owner Lookup
- For Purview users, introduced a utility function for the MS Graph, making it easier to look up user object ids.
PurviewClient.msgraph.upn_to_idPurviewClient.msgraph.email_to_id
- After introducing these utility functions, the
ExcelReader.parse_bulk_entitiesmethod takes acontacts_func.- The contacts_func parameter takes a function and will be executed for every contact provided in the experts and owners columns.
AtlasObjectId to Avoid Updating Existing Required Relationships
-
The
ExcelReader.parse_bulk_entitiesnow supports using anAtlasObjectIdas a reference in the[Relationship].- For example, if you wanted to reference an existing entity without uploading it in the BulkEntities tab, you would use...
AtlasObjectId(guid:xx-yy-zz)orAtlasObjectId(typeName:someType qualifiedName:someQualifiedName).- This would be the value inside of a
[Relationship] xyzcolumn where xyz is the relationship attribute name. - This is really useful when you have a required relationship (like azure_sql_schema for an azure_sql_table) that also has a required relationship.
- This lets you reference only the first dependency and you don't risk changing anything like the name or having to deal with required types.
-
The
PurviewClientandAtlasClientnow have aglossaryproperty which supports many of the glossary endpoints. -
In addition a
PurviewGlossaryTermand anAtlasGlossaryTermclass are provided.PurviewGlossaryTermsupports term hierarchy with theadd_hierarchymethod.
-
For current Atlas users, added support for defining businessMetadataDefs.
-
For current Atlas users, added support for the label endpoints by introducing:
AtlasClient.update_entity_labelsAtlasClient.delete_entity_labels
-
For current Atlas users (and one day Purview users too), added support for customAttributes in the excel upload by using a column header
[custom] myAttribute.
Breaking Changes
- Added a deprecation warning around the
AtlasClientglossary methods. Users should migrate toAtlasClient.glossaryorPurviewClient.glossary.