Analytics
The following analytic use cases will help you understand how to use TripleBlind to conduct privacy-preserving analytics on 3rd-party data.
Use Case #1: Blind Join (SDK)
Using the TripleBlind SDK, join two or more tabular datasets on the intersection of a given column and return any columns for the intersection subset. Personas represented in this use case are: Data Scientist or Data Analyst (User), Dataset Owner.
Workflow
The following workflow is used to perform this analysis using TripleBlind.
- Initialize a TripleBlind session
- Register new assets or locate existing assets
- Explore assets
- Run an analysis process and get results
Steps
To execute this use case follow these steps in your Python IDE:
1. The User authenticates with the TripleBlind Router and starts a Session.
import tripleblind as tb tb.initialize(api_token=user1_token)
ℹ️The call to tb.initialize
is unnecessary if the User token is set up in the User’s tripleblind.yaml
file.
2. The User registers a dataset as a new asset.
asset_0 = tb.Asset.position( file_handle=data_dir / "store_transactions.csv", name=f"Shop Transaction-{run_id}", desc="Fictional retail transaction data.", is_discoverable=True, cost=1, )
Or, searches for an existing dataset by name or UUID.
asset0 = tb.TableAsset.find("Shop Transaction") # or asset0 = tb.TableAsset.find("673b8bd1-e758-4d56-b6c1-4e1ff946f1c7")