<commit_before><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Analytics>
    <Name>APIM_LOGANALYZER_SCRIPT</Name>
    <Script>
        CREATE TEMPORARY TABLE CopyOfLoganalyzer USING CarbonAnalytics OPTIONS (tableName "LOGANALYZER", schema "_class
        string -i, _content string -i, tenantID string -i, _level string -i, _trace string -i, _eventTimeStamp long
        -i",primaryKeys "_class, _content, _level, _eventTimeStamp");

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_DAILY",
        schema "tenantID string -i, message string -i, messageCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_daily SELECT temp.tenantID AS tenantID, temp.message AS myMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT _content AS message,
        getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS byMonth,
        getDay(_eventTimeStamp) AS byDay, count(*) as messageCount, tenantID AS tenantID FROM CopyOfLoganalyzer
        WHERE _level LIKE 'ERROR'
        GROUP BY _content, _eventTimeStamp, tenantID ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.message, temp.byYear,
        temp.byMonth, temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_DAILY",
        schema "tenantID string -i, class string -i, classCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_daily SELECT temp.tenantID AS tenantID, temp.class AS myClass, SUM(temp.classCount) AS
        totalClassCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT _class AS class,
        getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS byMonth,
        getDay(_eventTimeStamp) AS byDay, count(*) as classCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE
        _level LIKE 'ERROR'
        GROUP BY _class, _eventTimeStamp, tenantID ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.class, temp.byYear, temp.byMonth,
        temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_MONTHLY",
        schema "tenantID string -i, class string -i, classCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_monthly SELECT temp.tenantID AS tenantID, temp.class AS myClass, SUM(temp.classCount)
        AS totalClassCount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT class AS class, getYear(_timestamp)
        AS byYear, getMonth(_timestamp) AS byMonth, first(classCount) as classCount, tenantID AS tenantID FROM
        loganalyzer_class_level_error_daily GROUP BY tenantID, class,
        _timestamp ORDER BY _timestamp)temp GROUP BY temp.tenantID, temp.class, temp.byYear, temp.byMonth ORDER BY temp.byYear,
        temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_MONTHLY",
        schema "tenantID string -i, message string -i, messageCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_monthly SELECT temp.tenantID AS tenantID, temp.message AS myMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT message AS message,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, first(messageCount) as messageCount, tenantID AS tenantID FROM
        loganalyzer_message_level_error_daily
        GROUP BY tenantID, message, _timestamp ORDER BY _timestamp)temp GROUP BY temp.tenantID, temp.message, temp.byYear, temp.byMonth ORDER BY
        temp.byYear, temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_WEEKLY",
        schema "tenantID string -i, class string -i, classCount int -i, week long -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_weekly SELECT temp.tenantID AS tenantID, temp.class AS myClass, SUM(temp.classCount)
        AS totalClassCount, temp.byWeek
        AS week,getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT class AS class,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, getWeek(_timestamp) AS byWeek, first(classCount)
        as classCount, tenantID AS tenantID FROM loganalyzer_class_level_error_daily GROUP BY tenantID, class, _timestamp ORDER BY _timestamp)temp GROUP
        BY temp.tenantID, temp.class, temp.byYear,
        temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_WEEKLY",
        schema "tenantID string -i, message string -i, messageCount int -i, week long -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_weekly SELECT temp.tenantID AS tenantID, temp.message AS myMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        temp.byWeek AS week, getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT message AS
        message, getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, getWeek(_timestamp) AS byWeek,
        first(messageCount) AS messageCount, tenantID AS tenantID FROM loganalyzer_message_level_error_daily GROUP BY tenantID, message, _timestamp
        ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.message, temp.byYear, temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_apim_artifact_deployed_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_ARTIFACT_DEPLOYED_DAILY", schema "artifact string -i -f, tenantID string -i, artifactCount int -i, _timestamp long
        -i");
        INSERT OVERWRITE table loganalyzer_apim_artifact_deployed_daily SELECT temp.artifact AS myArtifact, temp.tenantID AS tenantID,
        SUM(temp.artifactCount) AS totalArtifactCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT
        SUBSTRING(_content,18,100) AS artifact, getYear(_eventTimeStamp) AS byYear,
        getMonth(_eventTimeStamp) AS byMonth, getDay(_eventTimeStamp) AS byDay, count(*)
        AS artifactCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE _content LIKE "%Initializing API:%" GROUP BY
        tenantID, _content, _eventTimeStamp
        ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.artifact, temp.byYear, temp.byMonth, temp.byDay ORDER BY
        temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_artifact_deleted_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_ARTIFACT_DELETED_DAILY",
        schema "artifact string -i -f, tenantID string -i, artifactCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_artifact_deleted_daily SELECT temp.artifact AS myArtifact, temp.tenantID AS tenantID,
        SUM(temp.artifactCount) AS totalArtifactCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT
        SUBSTRING(_content,17,100) AS artifact, getYear(_eventTimeStamp) AS byYear,
        getMonth(_eventTimeStamp) AS byMonth, getDay(_eventTimeStamp) AS byDay, count(*)
        AS artifactCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE _content LIKE "%Destroying API:%" GROUP BY tenantID, _content,
        _eventTimeStamp Order
        by _eventTimeStamp)temp GROUP BY temp.tenantID, temp.artifact, temp.byYear, temp.byMonth, temp.byDay ORDER BY temp.byYear,
        temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_DAILY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_daily SELECT temp.tenantID AS tenantID, temp.apiName AS myApiName,
        SUM(temp.apiCount) AS totalAPICount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT getRegexMatch(_class, "(?&lt;=API_LOGGER.admin--)(.*)")
        AS apiName, getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS
        byMonth, getDay(_eventTimeStamp) AS byDay, count(*) AS apiCount, tenantID AS tenantID FROM CopyOfLoganalyzer
        WHERE _content LIKE
        "%Error while building message%" AND _class LIKE "%API_LOGGER.admin--%" GROUP BY tenantID, _class, _eventTimeStamp ORDER BY _eventTimeStamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth, temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_WEEKLY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i,
        week long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_weekly SELECT temp.tenantID AS tenantID, temp.apiName AS myApiName,
        SUM(temp.apiCount) AS totalAPICount, temp.byWeek AS week,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT apiName AS apiName,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS
        byMonth, getWeek(_timestamp) AS byWeek, first(apiCount) AS apiCount, tenantID AS tenantID FROM
        loganalyzer_apim_message_processing_daily
        GROUP BY tenantID, apiName, _timestamp ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_MONTHLY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_monthly SELECT temp.tenantID AS tenantID, temp.apiName AS myApiName,
        SUM(temp.apiCount) AS totalAPICount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT apiName AS apiName,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS
        byMonth, first(apiCount) AS apiCount, tenantID AS tenantID FROM loganalyzer_apim_message_processing_daily
        GROUP BY tenantID, apiName, _timestamp ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth ORDER BY temp.byYear, temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_apikey_status USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIKEY_STATUS",
        schema "status string -i, content string -i, byYear int -i, byMonth int -i, byDay int -i, _timestamp long -i");

        INSERT OVERWRITE table loganalyzer_apikey_status<commit_msg>Updating loganalyzer script by refactoring fields.<commit_after><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Analytics>
    <Name>APIM_LOGANALYZER_SCRIPT</Name>
    <Script>
        CREATE TEMPORARY TABLE CopyOfLoganalyzer USING CarbonAnalytics OPTIONS (tableName "LOGANALYZER", schema "_class
        string -i, _content string -i, tenantID string -i, _level string -i, _trace string -i, _eventTimeStamp long
        -i",primaryKeys "_class, _content, _level, _eventTimeStamp");

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_DAILY",
        schema "tenantID string -i, message string -i, messageCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_daily SELECT temp.tenantID AS tenantID, temp.message AS logMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT _content AS message,
        getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS byMonth,
        getDay(_eventTimeStamp) AS byDay, count(*) as messageCount, tenantID AS tenantID FROM CopyOfLoganalyzer
        WHERE _level LIKE 'ERROR'
        GROUP BY _content, _eventTimeStamp, tenantID ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.message, temp.byYear,
        temp.byMonth, temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_DAILY",
        schema "tenantID string -i, class string -i, classCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_daily SELECT temp.tenantID AS tenantID, temp.class AS logClass, SUM(temp.classCount) AS
        totalClassCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT _class AS class,
        getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS byMonth,
        getDay(_eventTimeStamp) AS byDay, count(*) as classCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE
        _level LIKE 'ERROR'
        GROUP BY _class, _eventTimeStamp, tenantID ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.class, temp.byYear, temp.byMonth,
        temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_MONTHLY",
        schema "tenantID string -i, class string -i, classCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_monthly SELECT temp.tenantID AS tenantID, temp.class AS logClass, SUM(temp.classCount)
        AS totalClassCount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT class AS class, getYear(_timestamp)
        AS byYear, getMonth(_timestamp) AS byMonth, first(classCount) as classCount, tenantID AS tenantID FROM
        loganalyzer_class_level_error_daily GROUP BY tenantID, class,
        _timestamp ORDER BY _timestamp)temp GROUP BY temp.tenantID, temp.class, temp.byYear, temp.byMonth ORDER BY temp.byYear,
        temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_MONTHLY",
        schema "tenantID string -i, message string -i, messageCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_monthly SELECT temp.tenantID AS tenantID, temp.message AS logMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT message AS message,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, first(messageCount) as messageCount, tenantID AS tenantID FROM
        loganalyzer_message_level_error_daily
        GROUP BY tenantID, message, _timestamp ORDER BY _timestamp)temp GROUP BY temp.tenantID, temp.message, temp.byYear, temp.byMonth ORDER BY
        temp.byYear, temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_class_level_error_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_CLASS_LEVEL_ERROR_WEEKLY",
        schema "tenantID string -i, class string -i, classCount int -i, week long -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_class_level_error_weekly SELECT temp.tenantID AS tenantID, temp.class AS logClass, SUM(temp.classCount)
        AS totalClassCount, temp.byWeek
        AS week,getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT class AS class,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, getWeek(_timestamp) AS byWeek, first(classCount)
        as classCount, tenantID AS tenantID FROM loganalyzer_class_level_error_daily GROUP BY tenantID, class, _timestamp ORDER BY _timestamp)temp GROUP
        BY temp.tenantID, temp.class, temp.byYear,
        temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_message_level_error_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_MESSAGE_LEVEL_ERROR_WEEKLY",
        schema "tenantID string -i, message string -i, messageCount int -i, week long -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_message_level_error_weekly SELECT temp.tenantID AS tenantID, temp.message AS logMessage,
        SUM(temp.messageCount) AS totalMessageCount,
        temp.byWeek AS week, getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT message AS
        message, getYear(_timestamp) AS byYear, getMonth(_timestamp) AS byMonth, getWeek(_timestamp) AS byWeek,
        first(messageCount) AS messageCount, tenantID AS tenantID FROM loganalyzer_message_level_error_daily GROUP BY tenantID, message, _timestamp
        ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.message, temp.byYear, temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_apim_artifact_deployed_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_ARTIFACT_DEPLOYED_DAILY", schema "artifact string -i -f, tenantID string -i, artifactCount int -i, _timestamp long
        -i");
        INSERT OVERWRITE table loganalyzer_apim_artifact_deployed_daily SELECT temp.artifact AS logArtifact, temp.tenantID AS tenantID,
        SUM(temp.artifactCount) AS totalArtifactCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT
        SUBSTRING(_content,18,100) AS artifact, getYear(_eventTimeStamp) AS byYear,
        getMonth(_eventTimeStamp) AS byMonth, getDay(_eventTimeStamp) AS byDay, count(*)
        AS artifactCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE _content LIKE "%Initializing API:%" GROUP BY
        tenantID, _content, _eventTimeStamp
        ORDER BY _eventTimeStamp)temp GROUP BY temp.tenantID, temp.artifact, temp.byYear, temp.byMonth, temp.byDay ORDER BY
        temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_artifact_deleted_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_ARTIFACT_DELETED_DAILY",
        schema "artifact string -i -f, tenantID string -i, artifactCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_artifact_deleted_daily SELECT temp.artifact AS logArtifact, temp.tenantID AS tenantID,
        SUM(temp.artifactCount) AS totalArtifactCount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT
        SUBSTRING(_content,17,100) AS artifact, getYear(_eventTimeStamp) AS byYear,
        getMonth(_eventTimeStamp) AS byMonth, getDay(_eventTimeStamp) AS byDay, count(*)
        AS artifactCount, tenantID AS tenantID FROM CopyOfLoganalyzer WHERE _content LIKE "%Destroying API:%" GROUP BY tenantID, _content,
        _eventTimeStamp Order
        by _eventTimeStamp)temp GROUP BY temp.tenantID, temp.artifact, temp.byYear, temp.byMonth, temp.byDay ORDER BY temp.byYear,
        temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_daily USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_DAILY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_daily SELECT temp.tenantID AS tenantID, temp.apiName AS logApiName,
        SUM(temp.apiCount) AS totalAPICount,
        getDateStartingTime(temp.byYear, temp.byMonth , temp.byDay) AS _timestamp FROM (SELECT getRegexMatch(_class, "(?&lt;=API_LOGGER.admin--)(.*)")
        AS apiName, getYear(_eventTimeStamp) AS byYear, getMonth(_eventTimeStamp) AS
        byMonth, getDay(_eventTimeStamp) AS byDay, count(*) AS apiCount, tenantID AS tenantID FROM CopyOfLoganalyzer
        WHERE _content LIKE
        "%Error while building message%" AND _class LIKE "%API_LOGGER.admin--%" GROUP BY tenantID, _class, _eventTimeStamp ORDER BY _eventTimeStamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth, temp.byDay ORDER BY temp.byYear, temp.byMonth, temp.byDay;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_weekly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_WEEKLY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i,
        week long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_weekly SELECT temp.tenantID AS tenantID, temp.apiName AS logApiName,
        SUM(temp.apiCount) AS totalAPICount, temp.byWeek AS week,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT apiName AS apiName,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS
        byMonth, getWeek(_timestamp) AS byWeek, first(apiCount) AS apiCount, tenantID AS tenantID FROM
        loganalyzer_apim_message_processing_daily
        GROUP BY tenantID, apiName, _timestamp ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth, temp.byWeek ORDER BY temp.byYear, temp.byMonth, temp.byWeek;

        CREATE TEMPORARY TABLE loganalyzer_apim_message_processing_monthly USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIM_MESSAGE_PROCESSING_MONTHLY", schema "tenantID string -i, apiName string -i, apiCount int -i, _timestamp long -i");
        INSERT OVERWRITE table loganalyzer_apim_message_processing_monthly SELECT temp.tenantID AS tenantID, temp.apiName AS logApiName,
        SUM(temp.apiCount) AS totalAPICount,
        getMonthStartingTime(temp.byYear, temp.byMonth) AS _timestamp FROM (SELECT apiName AS apiName,
        getYear(_timestamp) AS byYear, getMonth(_timestamp) AS
        byMonth, first(apiCount) AS apiCount, tenantID AS tenantID FROM loganalyzer_apim_message_processing_daily
        GROUP BY tenantID, apiName, _timestamp ORDER BY _timestamp)temp GROUP BY
        temp.tenantID, temp.apiName, temp.byYear, temp.byMonth ORDER BY temp.byYear, temp.byMonth;

        CREATE TEMPORARY TABLE loganalyzer_apikey_status USING CarbonAnalytics OPTIONS (tableName
        "LOGANALYZER_APIKEY_STATUS",
        schema "status string -i, content string -i, byYear int -i, byMonth int -i, byDay int -i, _timestamp long -i");

        INSERT OVERWRITE table loganalyzer_apikey_status
{'fraction_non_alphanumeric': 0.067889041566472, 'fraction_numerical': 0.001116454826520096, 'mean_word_length': 4.197277393438965, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 2, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6352352', 'n_tokens_mistral': 7359, 'n_tokens_neox': 6886, 'n_words': 2028}