Is there a way to track which DOMO assets (cards, datasets, dataflow, etc) uses a specific field?
We found the Card Fields & Beast Modes Governance dataset which shows what fields are being used in cards and beast modes but we would like to track a field name from it's original dataset > name change (if it applies) > DOMO asset.
Best Answers
-
There isn't a specific dataset that would track this information. You'd have to get the card definition yourself to see if there is a field rename happening utilizing something like the java CLI with the backup-card command but that will only get your the JSON definition in a file and not as a dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Good question @Jarren. Expanding on what Grant suggested, you might be able to poll Domo via Python or other method. Something like this would give you a list of things affected by a rename.
import requests
import json
# Replace with your Domo credentials and API endpoints
client_id = 'YOUR_CLIENT_ID'
client_secret = 'YOUR_CLIENT_SECRET'
api_url = 'https://api.domo.com/v1/'
def get_access_token(client_id, client_secret):
auth_url = 'https://api.domo.com/oauth/token?grant_type=client_credentials'
response = requests.post(auth_url, auth=(client_id, client_secret))
response_data = response.json()
return response_data['access_token']
def get_datasets(access_token):
datasets_url = f'{api_url}datasets'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(datasets_url, headers=headers)
return response.json()
def get_cards(access_token):
cards_url = f'{api_url}cards'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(cards_url, headers=headers)
return response.json()
def get_beast_modes(access_token):
beast_modes_url = f'{api_url}beastmodes'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(beast_modes_url, headers=headers)
return response.json()
def find_field_usage(field_name, datasets, cards, beast_modes):
# Check datasets
for dataset in datasets['data']:
dataset_id = dataset['id']
# Assume you have a way to fetch dataset schema
schema = get_dataset_schema(access_token, dataset_id)
for field in schema['fields']:
if field['name'] == field_name:
print(f'Field {field_name} found in dataset {dataset_id}')
# Check cards and beast modes similarly
# ...
def main():
access_token = get_access_token(client_id, client_secret)
datasets = get_datasets(access_token)
cards = get_cards(access_token)
beast_modes = get_beast_modes(access_token)
field_name = 'your_field_name'
find_field_usage(field_name, datasets, cards, beast_modes)
if __name__ == '__main__':
main()** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Answers
-
There isn't a specific dataset that would track this information. You'd have to get the card definition yourself to see if there is a field rename happening utilizing something like the java CLI with the backup-card command but that will only get your the JSON definition in a file and not as a dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Thanks for the response @GrantSmith
0 -
Good question @Jarren. Expanding on what Grant suggested, you might be able to poll Domo via Python or other method. Something like this would give you a list of things affected by a rename.
import requests
import json
# Replace with your Domo credentials and API endpoints
client_id = 'YOUR_CLIENT_ID'
client_secret = 'YOUR_CLIENT_SECRET'
api_url = 'https://api.domo.com/v1/'
def get_access_token(client_id, client_secret):
auth_url = 'https://api.domo.com/oauth/token?grant_type=client_credentials'
response = requests.post(auth_url, auth=(client_id, client_secret))
response_data = response.json()
return response_data['access_token']
def get_datasets(access_token):
datasets_url = f'{api_url}datasets'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(datasets_url, headers=headers)
return response.json()
def get_cards(access_token):
cards_url = f'{api_url}cards'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(cards_url, headers=headers)
return response.json()
def get_beast_modes(access_token):
beast_modes_url = f'{api_url}beastmodes'
headers = {'Authorization': f'Bearer {access_token}'}
response = requests.get(beast_modes_url, headers=headers)
return response.json()
def find_field_usage(field_name, datasets, cards, beast_modes):
# Check datasets
for dataset in datasets['data']:
dataset_id = dataset['id']
# Assume you have a way to fetch dataset schema
schema = get_dataset_schema(access_token, dataset_id)
for field in schema['fields']:
if field['name'] == field_name:
print(f'Field {field_name} found in dataset {dataset_id}')
# Check cards and beast modes similarly
# ...
def main():
access_token = get_access_token(client_id, client_secret)
datasets = get_datasets(access_token)
cards = get_cards(access_token)
beast_modes = get_beast_modes(access_token)
field_name = 'your_field_name'
find_field_usage(field_name, datasets, cards, beast_modes)
if __name__ == '__main__':
main()** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Wow! Thanks @ArborRose! I'll give this a try
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive