Blackboard Analytics Code Snippets

/****
* Snippet: Load a Dimension
*/
exec HEA.ProcessEntity @EntityCode = ‘DimSample’
go
/****
* Snippet: Load a Dimension and display the final Manifest
*/
exec HEA.ProcessEntity @EntityCode = ‘DimSample’, @DebugMode = 1
go
/****
* Snippet: Load a Fact Table
*/
exec HEA.ProcessEntity @EntityCode = ‘FactSample’
go
/****
* Snippet: Load a Fact Table and display the final Manifest
*/
exec HEA.ProcessEntity @EntityCode = ‘FactSample’, @DebugMode = 1
go
/****
* Snippet: View current Extract SQL for a Source table
*/
select [Value]
from HEA.Clause
where DomainCode = ‘Full Extract’ and TargetTableName = ‘SOURCE_TABLE’
order by Ordinal
/****
* Snippet: Rebuild the SQL extract clauses based on new metadata
*/
exec HEA.BuildClauses @DomainCode = ‘Full Extract’, @TargetTableName = ‘SOURCE_TABLE’
/****
* Snippet: Extract a Source table
*/
exec HEA.ExtractSourceData @DomainCode = ‘Full Extract’, @TargetTableName = ‘SOURCE_TABLE’
/****
* Snippet: View the dimension and fact manifests from the last load
*/
declare @EventLoadCycleKey int
select @EventLoadCycleKey = max(EventLoadCycleKey) from HEA.EventLoadCycle
select EventLogKey, EventTimeStamp, Message, Manifest
from HEA.EventLog where EventLoadCycleKey = @EventLoadCycleKey and TypeCode = ‘Transform Completed’
go

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s