Hello. Glad that the cross-schema thing got sorted. Yes, you can create marts in any schema based on any other schema in the same server (and in the case of Oracle, you can even do it cross-server if you have cross-database links configured - ask your DBA!), but you definitely cannot build a mart cross-platform (e.g. MySQL and Oracle combo).
The TEMP tables are numbered sequentially in the order they are generated by MartBuilder. The initial select and each subsequent join get their own TEMP table name. After each join/delete/update/modification that MartBuilder performs, the previous TEMP table gets dropped, leaving only the new one. After the very last step, the last remaining table gets renamed to the final name intended for that table. Some tables can be made purely from the initial select, in which case the transformation for that table consists just of a select, followed by a rename, followed by some index statements. Yes, MartBuilder _could_ be modified to use the final name in the last select/join step for each table instead of instigating a separate rename afterwards, but this would make the code unnecessarily complicated. The table renames take so little time anyway that it hardly seems worth the effort - I preferred to write simpler code that would be easier to maintain than to shave nanoseconds off a transformation that would probably take minutes at least if not hours to complete. cheers, Richard 2008/6/9 Renato Golin <[EMAIL PROTECTED]>: > Arek Kasprzyk wrote: >> >> sorry you misunderstood me :) of course it does not have to be in the same >> schema. (it could be) but normally it ends up in a separate schema. > > Hi Arek, > > Ok, now it makes more sense. I noticed the queries use the schema.tablename > convention to allow you to query on a different schema. > > >> however the SQL statements there which do the transform and being executed >> ( eg "CREATE TABLE mart_shema.new_table as SELECT FROM >> source_schema.table_a, source_schema.table_b ... etc") >> assume this is run on the same platform > > That's it, and because you're creating the new tables directly from a select > across schemas, it makes sense. > > Now I don't understand why to create the temporary name TEMP0 if you're > renaming afterwards... > > create table unimart.TEMP0 as select ... from RENATO1.CV_COMMENT_TOPICS; > alter table unimart.TEMP0 rename to C__CV_COMMENT_TOPICS__main; > > Thanks, > --renato > > > -- > Reclaim your digital rights, eliminate DRM, learn more at > http://www.defectivebydesign.org/what_is_drm >
