Tuesday, 28 February 2017

postgresql - Get list of all tables in CartoDB account with SQL statement?



How can I get a list of all available tables in my own authenticated CartoDB account with a SQL statement?


This returns null:


SELECT table_name as t FROM information_schema.tables WHERE table_schema = 'public';

Alternatively, could it be done with CartoDB.js?



Answer



You cannot do it from unauthenticated queries. You can do it inside the dashboard though with this,


SELECT * FROM CDB_UserTables()

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...