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
- Product Ideas
- 2.1K Ideas Exchange
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 664 Datasets
- 120 SQL DataFlows
- 2.3K Magic ETL
- 825 Beast Mode
- Visualize
- 2.6K Charting
- 89 App Studio
- 46 Variables
- Automate
- 197 Apps
- 489 APIs & Domo Developer
- 94 Workflows
- 24 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 119 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 144 Governance & Security
- 11 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive