made some fixes for data cubes
added custom_sql