w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Structuring the data warehouse?
A fact table represents a process or events that you want to analyze. If there is not a new process or event that you want to analyze, then you do not need a new fact table. Perhaps you could give us some more details about what you are analyzing...

Categories : Database

Building data warehouse dimension
Assuming that you're using a star schema (not always the best approach, BTW), your product dimension table should have a key that is unique to the DW. Thus, SKU 186 might have a DW-specific key of 1 and SKU 294 might have a DW-specific key of 2. Your fact table, which holds 'transaction records' (sales records?), will have a compound key composed of multiple foreign key columns (eg. product_key, date_key, location_key, etc.). This foreign key to the product table in this case is to the DW-specific product key, NOT to the source system SKU. The ETL to populate your fact table should 'translate' the source system product key into the DW-specific product key as you bring the data in. NOTE: This is the general approach to populating fact tables. There can be variations based on specific

Categories : Database

Data Warehouse type solution?
Both seem to have their benefits and drawbacks, I'd personally go the second route, especially if you're dealing with very large amounts of records, as to not tie up the database with continuous hits to delete records.

Categories : Dotnet

Warehouse PostgreSQL database architecture recommendation
Two thoughts immediately come to mind for reporting: 1). Set up some summary (aka "aggregate") tables that are precomputed results of the queries that your users are likely to run. Eg. A table containing the counts and sums grouped by the various dimensions. This can be an automated process -- a db function (or script) gets run via your job scheduler of choice -- that refreshes the data every N minutes. 2). Regarding replication, if you are using Streaming Replication (PostgreSQL 9+), the changes in the master db are replicated to the slave databases (hot standby = read only) for reporting.

Categories : Database

Java/.NET Developer moving towards Data Warehouse
A data warehouse is usually a reformatted version of a transactional database intended for fast access, providing business insight to end users (technical and non-technical). For example, a datawarehouse in the Kimball model is a denormalized (think tall and skinny) version of the transaction database in a star schema. The data is taken from the OLTP database, goes through an ETL process (Extract, Transform, Load), and then is made available to business users (for end-user UI querying a la Business Objects, for example). There are many, many variations on this. You would be well served to look at some articles on basic Kimball-style datawarehouses (and I'm not trying to be biased, it's just what I've used in the past). There are early edition used Kimball Warehousing books on Amazon

Categories : Sql Server

Delete record from DB warehouse after matching it with staging for the last 5 days
I haven't tried this, but the documentation says that you can add an "AND" clause to "WHEN NOT MATCHED BY SOURCE". This would let you do this: WHEN NOT MATCHED BY SOURCE AND Your_Date_Field > DateAdd(Day,-5,GetDate()) THEN DELETE; Note that if your dates includes times you might need to truncate the time before you compare the dates.

Categories : SQL

Is mongo db suited for OLTP or Data warehouse operations ?
I'm using MongoDB for OLTP operations, currently I have 100+ operations/sec. and MongoDB can handle much more. In perfect case you can expect tens of thousands operations per second, but this number is hard to achieve in pratice. Response time really depends on you replication/write preferences, because MongoDB gives you control over query execution(see CAP theorem). I don't know what you mean about effiency, I can say that insert operations is efficient enough(don't use updates for OLTP). I have no experience with MongoDB security options, because all my web applications have full access to DB and I closed REST-API for public access. Don't use MongoDB's MapReduce for large datasets, you have to trust me :). This is pain! I found Aggregation Framework suitable for large variety of ope

Categories : Mongodb

What approach should I follow for report SSRS , SSIS ETL and Data warehouse
1) I'm not sure you want a table per report. I guess you might end up with this if non of your reports used the same fields. When I hear data warehouse, I think dimensional model/star schema. The benefit of a star schema is that it simplifies the data model and reduces the amount of joins you might have to go through to get the data you need, optimizing for data retrieval. 2) The answer to this question depends on your goals. Many companies with a data warehouse try to do all non-real-time reporting out of their data warehouse or an ODS to reduce the load on the production OLTP system. If optimized reliability and speed of report delivery is the goal, then test query speeds, data integrity, and accuracy and decide if a data warehouse with ETL provides a better experience (and if that j

Categories : Sql Server

How to create a table with large amount of data that supports fast queries in a warehouse?
Given your very clear and specific requirements, I would suggest you create a non-clustered index for each field and leave it to the optimiser as a first step. (ie you create 12 indexes) Place only a single field in each index. Dont index ( or at least use caution ) any long text type fields. Also dont index a field such as M/F that has only 2 values and a 50/50 split. I am assuming you have predicates on each field, but dont bother indexing any fields that are never used for selection purposes. If you still have problems after this, find the query analyser in sql server and use it to guide how queries are processed. Multi segmented indexes are sometimes better, but if your queries are mostly restricting to a small subset of the table then single field indexs will be fine. You might hav

Categories : Sql Server

how to extract data from mongo collection for data warehouse use
give a try to pentaho kettle. https://anonymousbi.wordpress.com/2012/07/25/creating-pentaho-reports-from-mongodb/

Categories : Mongodb

How should data be provided to a web server using a data warehouse?
I don't really see how SQL injection could be a real concern. I assume you have some calendar type field that the user fills in to get data out. If this is the only form just ensure that the only field that is in it is a date then something like DROP TABLE isn't possible. As for getting access to the database, that is another issue. However, a separate file with just the connection function should do fine in most cases so that a user can't, say open your webpage in an HTML viewer and see your database connection string. As for the CSV, I would have to say querying a database per user, especially if it's only used ~10 times weekly would be much more efficient than the CSV. I just equate the CSV as overkill because again you only have ~10 users attempting to get some information, to export

Categories : SQL

(Cube) Rotation with three.js
Sorry, cannot comment and this is for sure not the perfect answer but if you have problems with the rotation, maybe your tweening is not quite right? What strikes my eye is that your function is only doing rotation on 1 axis and still you update all three axes. Maybe you should leave away x and z and only update the correct axis? Maybe this helps with your problem, too because you know what you are actually changing. It is just an idea , though.

Categories : Javascript

Three.js - Cannot 'See Through' Cube Face
Maybe your cubes are getting culled. By default, only the front of each face is drawn. Try setting material.side = THREE.DoubleSide for all cube materials (well the transparent material shouldn't need it, but all others). felt.side = THREE.DoubleSide; wood.side = THREE.DoubleSide; var materials = new THREE.MeshFaceMaterial([ felt, wood, transparent ]);

Categories : HTML

How to test changes to a cube?
You can create a Visual Studio project based on an existing cube. This will get everything in a project so you can investigate the calculations, make the necessary changes, deploy to a test environment, and check everything out before deploying to production. Don't forget to check the project into source control ;-)

Categories : Sql Server

Not able to connect to cube
The format should be using Provider & not ProviderName as well some more corrections as below. <add name="OLAPConnectionString" connectionString="Provider=MSOLAP; Data Source=.;Initial Catalog=OMS; Integrated Security=True"/> Check MSDN here. This Another Link also describes the same.

Categories : Asp Net

Cube mapping in OpenGL
Texture cube maps are mapped using a 3D texture coordinate: it is used to determine which face cube is actually selected, and then derive the actual 2D texture coordinate used for accessing to the cube map face textel. Your texture coordinates are 2D (wrongly), and indeed you texture coordinate vertexUV (and consequently vCoords) Z coordinate is always 0, mapping non-definitively the texture (missing components are copied by the default attribute value, that is vec4(0,0,0,1)). To get the wanted result, modify the vertex shader in order to use a meaninful coordinate: vCoords = normalize(vVertexPos);

Categories : Opengl

Can OLAP CUBE be done in HBase?
It is quite possible. In fact several attempts have been made in recent past towards the same. See this and this, for example. You might also find this presentation helpful, which talks about Low Latency “OLAP” with HBase. HTH

Categories : Hadoop

Trouble with moving cube
This is might be working, if(Input.GetKey(KeyCode.LeftArrow)) { transform.position+=-transform.right*speed; } if(Input.GetKey(KeyCode.RightArrow)) { transform.position+=transform.right*speed; } if(Input.GetKey(KeyCode.UpArrow)) { transform.position+=transform.forward*speed; } if(Input.GetKey(KeyCode.DownArrow)) { transform.position+=-transform.forward*speed; }

Categories : Unity3d

vertex of a 3d cube grid c++
First define a simple struct point3D: typedef struct { float x; float y; float z; } point3D; I wrote this to generate the grid: //Compute edge sizes float x_size = xe - xs; float y_size = ye - ys; float z_size = ze - zs; //Compute steps float x_step = x_size/n_step; float y_step = y_size/n_step; float z_step = z_size/n_step; //Points per edge (including ending point) int n = n_step + 1; //Alloc grid (you can use malloc if you prefer) point3D grid[n*n*n]; for (int i = 0; i < n; i++) { //move on x axis for (int j = 0; j < n; j++) { //move on y axis for (int k = 0; k < n; k++) { //move on z axis point3D p; p.x = xs + x_step * i; p.y = ys + y_step * j; p.z = zs + z_step * k; grid[i+n*j+n*n*k] = point3D; } } } To take the

Categories : C++

draw cube into 3D scatterplot in RGL
Here's something I had around for various purposes. It should get you started. box <- data.frame( x = c(1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1), y = c(1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1), z = c(1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1)) segments3d(box$x, box$y, box$z, line_antialias = TRUE, col = "blue") points3d(0,0,0, col = "red", size = 5, point_antialias = TRUE)

Categories : R

Drawing a 3D Cube and rotate it
Since Xcode became a separate app the /Developer folder was removed and things like texturetool were placed within the Xcode app bundle. The new texturetool path is: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool You need to go into Build Phases > Run Script and change the first line from: TEXTURE_TOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool To: TEXTURE_TOOL=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool

Categories : Objective C

Cube maps in libgdx
http://searchcode.com/codesearch/view/37311049 I have finally found some source code which uses a cube map.It has no comments though It should be pretty easy to understand if you know opengl-es.

Categories : Android

Create a rotating cube with ONLY CSS
There are tons of tutorials/examples show how to do this: Example 1 Example 2 Example 3 Example 4 etc. Pulled from Example 2: .spinner div { position: absolute; width: 120px; height: 120px; border: 1px solid #ccc; background: rgba(255,255,255,0.8); box-shadow: inset 0 0 20px rgba(0,0,0,0.2); text-align: center; line-height: 120px; font-size: 100px; } .spinner .face1 { -webkit-transform: translateZ(60px); -ms-transform: translateZ(60px); transform: translateZ(60px); } .spinner .face2 { -webkit-transform: rotateY(90deg) translateZ(60px); -ms-transform: rotateY(90deg) translateZ(60px); transform: rotateY(90deg) translateZ(60px); } .spinner .face3 { -webkit-transform: rotateY(90deg) rotateX(90deg) translateZ(60px);

Categories : CSS

How would I add a 3d cube at these coordinates? OpenGL11
Yay! Immediate mode ftw! float sizeX = 100; float sizeY = 200; float sizeZ = 80; float centerX = 20; float centerY = 30; float centerZ = 10; float [] yay = { centerX-sizeX*.5,centerY+sizeY*.5,centerZ+sizeZ*.5, centerX-sizeX*.5,centerY-sizeY*.5,centerZ+sizeZ*.5, centerX+sizeX*.5,centerY-sizeY*.5,centerZ+sizeZ*.5, centerX+sizeX*.5,centerY+sizeY*.5,centerZ+sizeZ*.5, centerX-sizeX*.5,centerY+sizeY*.5,centerZ-sizeZ*.5, centerX-sizeX*.5,centerY-sizeY*.5,centerZ-sizeZ*.5, centerX+sizeX*.5,centerY-sizeY*.5,centerZ-sizeZ*.5, centerX+sizeX*.5,centerY+sizeY*.5,centerZ-sizeZ*.5, centerX+sizeX*.5,centerY+sizeY*.5,centerZ-sizeZ*.5, centerX+sizeX*.5,centerY-sizeY*.5,centerZ-sizeZ*.5, centerX+sizeX*.5,centerY-sizeY*.5,centerZ+sizeZ*.5, centerX+sizeX*.5,centerY+sizeY*.5,centerZ+s

Categories : Java

Planes overlapped by cube in Three.js
What you are seeing is an artifact of CanvasRenderer. The best you can do is tessellate your geometry. For example, THREE.CubeGeometry( 100, 100, 100, 4, 1, 4 ); THREE.PlaneGeometry( 100, 100, 4, 4 ); The other alternative is to switch to WebGLRenderer. three.js r.58

Categories : Javascript

Three.js cube with different texture on each face
dice = new THREE.Mesh( new THREE.BoxGeometry( 562, 562, 562, 1, 1, 1 ), new THREE.MeshFaceMaterial( materials ) ); scene.add( dice ); Be careful of copying old examples from the net. Always check the Migration Wiki for help upgrading to the current version. three.js r.70

Categories : Three Js

Cube is a rectangular Prism
I'm not sure you're having a problem here. I ran the app in the simulator, and saw that the block was rendered in perspective, albeit with a few lines missing. I'd suggest adding some code so that swipes or touches change the perspective, to see if it looks like a square once you've maneuvered it so that each face is square to the viewer. You'll make progress faster if you can interact with app instead of having to go through the compile-link-simulate cycle for every parameter change you want to evaluate.

Categories : IOS

OpenGL 3D Cube Rotation
What do you see when you run that program? Just to make sure, the definition for glRotatef is here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd368577(v=vs.85).aspx The 'angle' portion is in degrees. I've made the mistake of handing it radians a few times, and it appears that my object isn't rotating. Also, glTranslatef will move your object in the +/- xyz direction. Traditionally, +y is up, +x is right, and +z is into the screen. This can all change depending on a few different things, like your view matrix.

Categories : Android

Wrap a material around a cube in Three.js
Typically, with a THREE.CubeGeometry, you can either: (1) Choose a single texture that repeats on each side of the cube, or (2) Have a different texture for each of the six sides You can also use repeat the number of times a texture is displayed on each side. For examples of each of these, check out the source code of the demos at: http://stemkoski.github.io/Three.js/Textures.html and http://stemkoski.github.io/Three.js/Texture-Repeat.html Hope this helps!

Categories : Javascript

Weird cube shape
I could do a wild guess and say its because of messed order of vertices in your indices (I would call them triangles further). Usually in 3d engines you have to set up order of vertices in triangles so they all are ordered same - i.e. clockwise or counter-clockwise - when you look at them from outside of shape they form. Speaking mathematically all normals of triangles in your shape should be directed either inside or outside of shape. The direction of normal tells 3d engine when to draw triangles - engine can do two times less work if it draws triangles only on one side - the insides of a solid objects in 99,99% cases are not to be seen by user. In your case look at indices 032 and 476 - they should be either 032/467 or 023/476. And so on.

Categories : C#

ROLLUP, CUBE or GROUPING SETS
I was able to answer my question with this query: DECLARE @cols AS NVARCHAR(MAX), @query AS NVARCHAR(MAX) SELECT @cols = ISNULL(@cols+',','') + QUOTENAME(DATENAME(MONTH, MNTH)+' '+DATENAME(YEAR, MNTH)) FROM CAPABILITY WHERE MNTH BETWEEN DATEADD(M,-10,CURRENT_TIMESTAMP) AND DATEADD(M,0,CURRENT_TIMESTAMP) GROUP BY DATENAME(MONTH, MNTH), DATENAME(YEAR, MNTH), DATEPART(MONTH,mnth) ORDER BY DATENAME(YEAR, MNTH), DATEPART(MONTH,mnth) SET @query = 'SELECT TYPE,CTQ,' +@cols+ 'FROM ( SELECT CASE WHEN CTQ IS NULL AND TYPE IS NULL THEN ''CUST + TRANS TOTAL'' WHEN CTQ IS NULL AND TYPE IS NOT NULL THEN TYPE+''TOTAL'' WHEN CTQ IS NULL AND TYPE IS NULL THEN '''' WHEN GROUPING(TYPE)=1 THEN ''CUST + TRANS'' ELSE TYPE END AS [TYPE], CTQ, SUM(opportunity)AS Sig

Categories : SQL

Rotation of cube by recalcutating each vertex
I've find the solution, i've not normalized the vector (rX,rY,rZ). After normalization all work perfect! @datenwolf: thanks for reply, i've already done the same operation on GPU, but i want execute it on CPU for an other question!

Categories : Java

How to create an object in a cube in Unity3D?
If I understand what you're trying to do correctly, I'd probably suggest something like the following. public class Instantiation : MonoBehaviour { void Start() { for (int y = 0; y < 5; y++) { for (int x = 0; x < 5; x++) { GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.AddComponent<Rigidbody>(); cube.transform.position = new Vector3(x, y, 0); } } } } It will create the GameObject cube (or whatever you desire) at the new transform.position. However instead of it's position being a specific Vector3, you have it as a randomly generated Vector3 from a new method. This method will be created to randomise the numbers for x then y and z within specific boundaries

Categories : Unity3d

Figuring out how much of the side of a cube is visible
First calculate the position of the vertexes in screen space. HOW TO: var screenspaceVertexPosition = vertex.position.applyProjection( this.projectionMatrix.multiplyMatrices(object.matrixWorld)) Do this for all 8 vertexes. Then figure out which planes are visible by checking the planes normals. Calculate then the area used by each face in screenspace. From there you can calculate the complete visible area and the percentage.

Categories : Javascript

Explanation of accurate measurements css 3d cube
You should post your current code. Anyway, I guess that your current images are 200px ? Then taking into account that (from your link): A 3D image slider Note that because of the way a cube works, the image is moved out towards the screen, and is bigger than it should be. You should move it back by half the width of an image to make sure it is normal size. If you translate your cube 100px (half the width) backwards, your images will be exactly 200px. If your images are not 200px, definitely post your code

Categories : CSS

Mysql - Equivalent of GROUP BY CUBE
Months later... I can get you every distinct total, but that's about it. CREATE TABLE combos (ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,REL_ID INT NOT NULL ,E INT NOT NULL ); INSERT INTO combos VALUES (1,1,10), (2,1,30), (3,1,8), (4,1,42), (5,1,57); SELECT DISTINCT n1.e + CASE WHEN n2.id IN(n1.id) THEN 0 ELSE n2.e END + CASE WHEN n3.id IN(n2.id,n1.id) THEN 0 ELSE n3.e END + CASE WHEN n4.id IN(n3.id,n2.id,n1.id) THEN 0 ELSE n4.e END + CASE WHEN n5.id IN(n4.id,n3.id,n2.id,n1.id) THEN 0 ELSE n5.e END x FROM combos n1 JOIN combos n2 ON n2.id <= n1.id JOIN combos n3 ON n3.id <= n2.id JOIN combos n4 ON n4.id <= n3.id JOIN combos n5 ON n5.id <= n3.id ORDER BY x; +-----+ | x | +-

Categories : Mysql

Simple cube and square sum function won't run (C)
You need to define a return type to your functions ! #include <stdio.h> int main() { int a; scanf("%d",a); printf("%d",cube(a)+sqr(a)); return 0; } int cube(int x) { return(x*x*x); } int sqr(int arg) { return(arg*arg); }

Categories : C

How to remove records from crossfilter cube
Crossfilter version 1.3 supports removing all records that match the current filters.

Categories : Misc

Method to create a cube in OpenGL
Wherever in your code you have e.g. glVertex3f(-1, -1, 1); mulitply them with the corresponding value of sx, sy, sz divided by 2 e.g. glVertex3f(-sx/2, -sy/2, sz/2); For the position you can issue a glTranslatef(x, y, z) before drawing the cube. If you insist on hardcoding this into the vertices then you should write the above statement as glVertex3f(x - sx/2, y - sy/2, z + sz/2);

Categories : Java

Folding a selection of points on a 3D cube
Found a pretty good solution that requires little effort to implement. Create a storage for a Hollow Cube with a size of n + 2, where n is the size of the cube contained in the data. This satisfies the : sides are touching but do not overlap or share certain points. This will simplify calculations and translations by creating a lookup array that uses Cartesian coordinates. With a single translation function to take the coordinates of a selected point, get the 'world position'. Using that function we can store each point into the cartesian lookup array. When selecting a point, we can again use the same function (or use stored data) and subtract (to get AA or min position) and add (to get BB or max position). Then we can just lookup each entry between the AA.xyz and BB.xyz coordinates.

Categories : Algorithm



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.