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
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 747 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive