Usage
DomoCLR accesses DOMO APIs through access tokens and API clients. To start out, you'll need to generate one.
- Generate an access token (per https://knowledge.domo.com/Administer/Specifying_Security_Options/04Managing_Access_Tokens)
- In SQL Server, insert your generated access token into DOMOCLR.dbo._DOMOAccessTokens
- In SQL Server, insert your company's DOMO domain into DOMOCLR.dbo.
DOMODefaultDomain (for example, contoso.domo.com)_DOMODefaultDomain (for example, contoso.domo.com)_ - Generate an API client at https://developer.domo.com. If you want to be able to download datasets, then make sure it has an Application Scope including "Data". If you want to be able to manage users/groups/group membership, then make sure the API has Application Scope to "User".
- In SQL Server, insert your API client ID, client secret, scope, and domo domain to DomoCLR.dbo.
DOMOSettings._DOMOSettings- For example, if your client ID is XYZ, your client secret is ABC, you've scoped to both user and data, and your domain is contoso.domo.com, then you'd insert two rows into DOMOCLR.dbo._DOMOSettings:
-
_['XYZ', 'ABC', 'data', 'contoso.domo.com'], ['XYZ', 'ABC', 'user', 'contoso.domo.com']
Downloading Data
The core sproc to download data is: dbo.DownloadFromDOMO. That said, to do anything with the data, you need to insert it into a database table (or temp table) that is prepopulated with the appropriate columns and data types to match your data set. There is an example at dbo.Download_Sample_Data_Set.