CREATE SCHEMA malloytest;



CREATE TABLE tbl2(visitorId BIGINT, visitNumber BIGINT, hits STRUCT(hitNumber BIGINT, "time" BIGINT, "hour" BIGINT, "minute" BIGINT, isSecure BOOLEAN, isInteraction BOOLEAN, isEntrance BOOLEAN, isExit BOOLEAN, referer VARCHAR, page STRUCT(pagePath VARCHAR, hostname VARCHAR, pageTitle VARCHAR, searchKeyword VARCHAR, searchCategory VARCHAR, pagePathLevel1 VARCHAR, pagePathLevel2 VARCHAR, pagePathLevel3 VARCHAR, pagePathLevel4 VARCHAR), "transaction" STRUCT(transactionId VARCHAR, transactionRevenue BIGINT, transactionTax BIGINT, transactionShipping BIGINT, affiliation VARCHAR, currencyCode VARCHAR, localTransactionRevenue BIGINT, localTransactionTax BIGINT, localTransactionShipping BIGINT, transactionCoupon VARCHAR), item STRUCT(transactionId VARCHAR, productName VARCHAR, productCategory VARCHAR, productSku VARCHAR, itemQuantity BIGINT, itemRevenue BIGINT, currencyCode VARCHAR, localItemRevenue BIGINT), contentInfo STRUCT(contentDescription VARCHAR), appInfo STRUCT("name" VARCHAR, "version" VARCHAR, id VARCHAR, installerId VARCHAR, appInstallerId VARCHAR, appName VARCHAR, appVersion VARCHAR, appId VARCHAR, screenName VARCHAR, landingScreenName VARCHAR, exitScreenName VARCHAR, screenDepth VARCHAR), exceptionInfo STRUCT(description VARCHAR, isFatal BOOLEAN, exceptions BIGINT, fatalExceptions BIGINT), eventInfo STRUCT(eventCategory VARCHAR, eventAction VARCHAR, eventLabel VARCHAR, eventValue BIGINT), product STRUCT(productSKU VARCHAR, v2ProductName VARCHAR, v2ProductCategory VARCHAR, productVariant VARCHAR, productBrand VARCHAR, productRevenue BIGINT, localProductRevenue BIGINT, productPrice BIGINT, localProductPrice BIGINT, productQuantity BIGINT, productRefundAmount BIGINT, localProductRefundAmount BIGINT, isImpression BOOLEAN, isClick BOOLEAN, customDimensions STRUCT("index" BIGINT, "value" VARCHAR)[], customMetrics STRUCT("index" BIGINT, "value" BIGINT)[], productListName VARCHAR, productListPosition BIGINT, productCouponCode VARCHAR)[], promotion STRUCT(promoId VARCHAR, promoName VARCHAR, promoCreative VARCHAR, promoPosition VARCHAR)[], promotionActionInfo STRUCT(promoIsView BOOLEAN, promoIsClick BOOLEAN), refund STRUCT(refundAmount BIGINT, localRefundAmount BIGINT), eCommerceAction STRUCT(action_type VARCHAR, step BIGINT, "option" VARCHAR), experiment STRUCT(experimentId VARCHAR, experimentVariant VARCHAR)[], publisher STRUCT(dfpClicks BIGINT, dfpImpressions BIGINT, dfpMatchedQueries BIGINT, dfpMeasurableImpressions BIGINT, dfpQueries BIGINT, dfpRevenueCpm BIGINT, dfpRevenueCpc BIGINT, dfpViewableImpressions BIGINT, dfpPagesViewed BIGINT, adsenseBackfillDfpClicks BIGINT, adsenseBackfillDfpImpressions BIGINT, adsenseBackfillDfpMatchedQueries BIGINT, adsenseBackfillDfpMeasurableImpressions BIGINT, adsenseBackfillDfpQueries BIGINT, adsenseBackfillDfpRevenueCpm BIGINT, adsenseBackfillDfpRevenueCpc BIGINT, adsenseBackfillDfpViewableImpressions BIGINT, adsenseBackfillDfpPagesViewed BIGINT, adxBackfillDfpClicks BIGINT, adxBackfillDfpImpressions BIGINT, adxBackfillDfpMatchedQueries BIGINT, adxBackfillDfpMeasurableImpressions BIGINT, adxBackfillDfpQueries BIGINT, adxBackfillDfpRevenueCpm BIGINT, adxBackfillDfpRevenueCpc BIGINT, adxBackfillDfpViewableImpressions BIGINT, adxBackfillDfpPagesViewed BIGINT, adxClicks BIGINT, adxImpressions BIGINT, adxMatchedQueries BIGINT, adxMeasurableImpressions BIGINT, adxQueries BIGINT, adxRevenue BIGINT, adxViewableImpressions BIGINT, adxPagesViewed BIGINT, adsViewed BIGINT, adsUnitsViewed BIGINT, adsUnitsMatched BIGINT, viewableAdsViewed BIGINT, measurableAdsViewed BIGINT, adsPagesViewed BIGINT, adsClicked BIGINT, adsRevenue BIGINT, dfpAdGroup VARCHAR, dfpAdUnits VARCHAR, dfpNetworkId VARCHAR), customVariables STRUCT("index" BIGINT, customVarName VARCHAR, customVarValue VARCHAR)[], customDimensions STRUCT("index" BIGINT, "value" VARCHAR)[], customMetrics STRUCT("index" BIGINT, "value" BIGINT)[], "type" VARCHAR, social STRUCT(socialInteractionNetwork VARCHAR, socialInteractionAction VARCHAR, socialInteractions BIGINT, socialInteractionTarget VARCHAR, socialNetwork VARCHAR, uniqueSocialInteractions BIGINT, hasSocialSourceReferral VARCHAR, socialInteractionNetworkAction VARCHAR), latencyTracking STRUCT(pageLoadSample BIGINT, pageLoadTime BIGINT, pageDownloadTime BIGINT, redirectionTime BIGINT, speedMetricsSample BIGINT, domainLookupTime BIGINT, serverConnectionTime BIGINT, serverResponseTime BIGINT, domLatencyMetricsSample BIGINT, domInteractiveTime BIGINT, domContentLoadedTime BIGINT, userTimingValue BIGINT, userTimingSample BIGINT, userTimingVariable VARCHAR, userTimingCategory VARCHAR, userTimingLabel VARCHAR), sourcePropertyInfo STRUCT(sourcePropertyDisplayName VARCHAR, sourcePropertyTrackingId VARCHAR), contentGroup STRUCT(contentGroup1 VARCHAR, contentGroup2 VARCHAR, contentGroup3 VARCHAR, contentGroup4 VARCHAR, contentGroup5 VARCHAR, previousContentGroup1 VARCHAR, previousContentGroup2 VARCHAR, previousContentGroup3 VARCHAR, previousContentGroup4 VARCHAR, previousContentGroup5 VARCHAR, contentGroupUniqueViews1 BIGINT, contentGroupUniqueViews2 BIGINT, contentGroupUniqueViews3 BIGINT, contentGroupUniqueViews4 BIGINT, contentGroupUniqueViews5 BIGINT), dataSource VARCHAR, publisher_infos STRUCT(dfpClicks BIGINT, dfpImpressions BIGINT, dfpMatchedQueries BIGINT, dfpMeasurableImpressions BIGINT, dfpQueries BIGINT, dfpRevenueCpm BIGINT, dfpRevenueCpc BIGINT, dfpViewableImpressions BIGINT, dfpPagesViewed BIGINT, adsenseBackfillDfpClicks BIGINT, adsenseBackfillDfpImpressions BIGINT, adsenseBackfillDfpMatchedQueries BIGINT, adsenseBackfillDfpMeasurableImpressions BIGINT, adsenseBackfillDfpQueries BIGINT, adsenseBackfillDfpRevenueCpm BIGINT, adsenseBackfillDfpRevenueCpc BIGINT, adsenseBackfillDfpViewableImpressions BIGINT, adsenseBackfillDfpPagesViewed BIGINT, adxBackfillDfpClicks BIGINT, adxBackfillDfpImpressions BIGINT, adxBackfillDfpMatchedQueries BIGINT, adxBackfillDfpMeasurableImpressions BIGINT, adxBackfillDfpQueries BIGINT, adxBackfillDfpRevenueCpm BIGINT, adxBackfillDfpRevenueCpc BIGINT, adxBackfillDfpViewableImpressions BIGINT, adxBackfillDfpPagesViewed BIGINT, adxClicks BIGINT, adxImpressions BIGINT, adxMatchedQueries BIGINT, adxMeasurableImpressions BIGINT, adxQueries BIGINT, adxRevenue BIGINT, adxViewableImpressions BIGINT, adxPagesViewed BIGINT, adsViewed BIGINT, adsUnitsViewed BIGINT, adsUnitsMatched BIGINT, viewableAdsViewed BIGINT, measurableAdsViewed BIGINT, adsPagesViewed BIGINT, adsClicked BIGINT, adsRevenue BIGINT, dfpAdGroup VARCHAR, dfpAdUnits VARCHAR, dfpNetworkId VARCHAR)[])[], totals STRUCT(visits BIGINT, hits BIGINT, pageviews BIGINT, timeOnSite BIGINT, bounces BIGINT, transactions BIGINT, transactionRevenue BIGINT, newVisits BIGINT, screenviews BIGINT, uniqueScreenviews BIGINT, timeOnScreen BIGINT, totalTransactionRevenue BIGINT, sessionQualityDim BIGINT));




