data-warehouse

Data Warehousing - Cube Cuboids

╄→尐↘猪︶ㄣ 提交于 2019-12-25 18:32:09
问题 Consider a cube defined on the following dimension hierarchies: {customer < customer_street < customer_city < customer_state} {supplier < supplier_city < supplier_state} {day < month < quarter < year} {product < product_line < product_category} The number of cuboids that contain the supplier and quarter attributes is: (a) 96 (b) 12 (c) 20 (d) 144 What is the answer and why? 来源: https://stackoverflow.com/questions/59297050/data-warehousing-cube-cuboids

Partition Exchange as publishing technique in SQL Server?

会有一股神秘感。 提交于 2019-12-25 14:38:05
问题 I'm familiar with the concept of using partitions in Oracle as a technique to pubish incremental additions to tables (in a DW context). (like this example) For example. a daily snapshot for a data mart fact table is loaded behind the scenes in a partition within a table. for example with date as the partition key (1 partitioned table, with only one partition). once the load is complete, and the contents are validated, the partition can be 'exchanged' into the true destination table (1

Design a dimension with multiple data sources

我与影子孤独终老i 提交于 2019-12-25 08:03:28
问题 I am designing a few dimensions with multiple data sources and wonder what other people have done to align the multiple business keys per data source. My Example: I have 2 data sources - the Ordering System and the Execution System. The Ordering system has details about payment and what should happen; the Execution System has details on what actually happened (how long it took etc, who executed on the order). Data from both systems is need to created a single fact. In both the Ordering and

How can a multi-valued dimension be expressed in a star-schema given that it has 1-to-many relationship [Dim 1: many Fact]?

送分小仙女□ 提交于 2019-12-25 04:11:58
问题 I am new to Data Warehouse practices and in the context of an academic exercise I would like to create a star-schema using a dataset in a chosen area of interest. So, my classmate and I chose a dataset of car accidents in a country during a year. The problem is that in a lot of cases if not the most, there are more than one cars involved. So if I choose to have incidents of "accidents" as the Fact Table with "Driver", "Car", "Casualties", "Location", "Contitions" etc as Dimentions, how can

MDX query - best salesmen who sold all of given products

好久不见. 提交于 2019-12-24 10:40:58
问题 Let's say I have two simple dimensions: Products - with id and name Salesmen - with id and name My fact table is named SALES and contains the ids of the abovementioned. I need to produce a query that will show the names of salesmen who sold all of the given products. This code solves the problem for two items X and Y: SELECT {} on 0, EXISTS( EXISTS( {[Salesmen].[Name].MEMBERS}, {[Products].[Name].&[X]} ) ,{[Products].[Name].&[Y]} ) ON 1 FROM [Test]; The other version is: SELECT {} on 0,

SQL or OLAP schema design for funnel analysis

半城伤御伤魂 提交于 2019-12-24 01:15:31
问题 I have an ecommerce system where users go through a few stages before they make a purchase (visit website, browse catalog, pick a product, goto purchase page, insert credit details etc...). Each event is saved in the following SQL events table: SessionId EventTypeId (PageView, Click, Type), EventValue (HomePage, Button-1 etc...) Timestamp Each session is saved in the following Sessions table (simplified): SessionId SelectedProductId SessionPurchaseAmount (0 for sessions without a purchase) My

not able to install SSDT for visual studio 2017 professional

早过忘川 提交于 2019-12-23 23:14:59
问题 Need your help I have successfully installed VS2017 on my computer . But when I tried to install SQL server data tools 15.6.0 or 15.5.1 it gives me error as below : Setup failed The configuration registry key could not be opened(0x800703F3) Thanks All!! 回答1: The latest version (15.6) of SSDT is incompatible with the latest version (15.7) of Visual Studio 2017. You currently have two choices: Wait for an updated version of SSDT or VS2017 to be released, or Completely uninstall VS2017 and

not able to install SSDT for visual studio 2017 professional

落花浮王杯 提交于 2019-12-23 22:35:21
问题 Need your help I have successfully installed VS2017 on my computer . But when I tried to install SQL server data tools 15.6.0 or 15.5.1 it gives me error as below : Setup failed The configuration registry key could not be opened(0x800703F3) Thanks All!! 回答1: The latest version (15.6) of SSDT is incompatible with the latest version (15.7) of Visual Studio 2017. You currently have two choices: Wait for an updated version of SSDT or VS2017 to be released, or Completely uninstall VS2017 and

MDX performance vs. T-SQL

早过忘川 提交于 2019-12-23 09:31:42
问题 I have a database containing tables with more than 600 million records and a set of stored procedures that make complex search operations on the database. The performance of the stored procedures is so slow even with suitable indexes on the tables. The design of the database is a normal relational db design. I want to change the database design to be multidimensional and use the MDX queries instead of the traditional T-SQL queries but the question is: Is the MDX query better than the

Skip rows in MySQL LOAD DATA INFILE statement when row has value 'x'

杀马特。学长 韩版系。学妹 提交于 2019-12-23 05:36:31
问题 Background: I have a fixed-width flat file with about 94 million rows of data. The file is from the HCUP Nationwide Inpatient Sample (NIS http://www.hcup-us.ahrq.gov/nisoverview.jsp), which provides information about hospitalizations over the past 12 years, each row a separate hospitalization. For my analyses, I will be querying diagnostic codes (ICD9-CM) to identify patients with various diagnoses. The fixed-width file contains information on up to 15 diagnostic codes, which are provided as