Is there a method implemented to download custom queries (e.g., SQL files or SQL files exported as text) from a data-source?
Our business is transitioning from using automated reports generated from custom sql to a star schema. We're in the process of transitioning from one schema to another and none of our sql is versioned in github. We're looking to progromatically fetch the workbook, grab the datasource, grab the custom query, then commit that within the file convention to bitbucket. Would something like this be possible within the current API or does anyone have a hack to do something like this?
I don't think there is API to fetch the custom query at the moment. However, all workbook (.twb) is an XML file, so you could use any XML parser to get the node with name like
name='Custom SQL Query'
I didn't try it myself, just try to give you some idea.