If you discover you can’t access a database you think you ought to have access to, check that you’re in the correct environment and using the correct API key. You can verify the td config and environmental variables are consistent with the API key and endpoint you need to access using the appropriate commands for your operating system. With correct permissions, the inability to access a specific database could happen for various reasons. To help determine the reason, it’s helpful to understand the order in which TD Toolbelt searches for the API key and API server:
- Specified on the command line by
td -koption, which allows you to specify an API key instead of reading the config file TREASURE_DATA_API_KEYenvironment variableTD_API_KEYenvironment variableTD_API_KEYin config file which path is specified bytd -coptionTD_API_KEYin config file which path is specified byTREASURE_DATA_CONFIG_PATHenvironment variableTD_API_KEYin config file which path is specified byTD_CONFIG_PATHenvironment variableTD_API_KEYin config file locates at~/.td/td.conf
- Specified on the command line by
td -eoption, which allows you to designate an endpoint TREASURE_DATA_API_SERVERenvironment variableTD_API_SERVERenvironment variableTD_API_SERVERin config file which path is specified bytd -coptionTD_API_SERVERin config file which path is specified byTREASURE_DATA_CONFIG_PATHenvironment variableTD_API_SERVERin config file which path is specified byTD_CONFIG_PATHenvironment variableTD_API_SERVERin config file locates at~/.td/td.conf