data warehouse
113 TopicsHow to increase SQL query performance of a view?
Hi everyone, I am new to Microsoft community, so please let me know if this post is not in the right forum and if so which one would be the right one. issue: - Update & query (using Power BI) of my Sales Weekly View takes forever (>30min) and I would like to understand how I could improve this Current setup: - Sales Daily View: View containing aggregation and joins of two main sales tables and a date table - Sales Weekly View: View joining the "Sales Daily View", a sales table and two dimension tables and containing extensive logics (mainly aggregations) Please let me know if you have any idea how to streamline this and improve the performance of the view.55KViews0likes4CommentsHow to get last updated date of the table
Hello Experts, I am looking for the date, when is the last update (delete, truncate and reinsert) was made on the table I came across SYS.DM_DB_INDEX_USAGE_STATS table with LAST_USER_UPDATE column, but sometime it returns NULL, Shall I believe on it gives me what I am looking for Regards, Amit19KViews0likes5CommentsDiscover the Future of Data Engineering with Microsoft Fabric for Technical Students & Entrepreneurs
Microsoft Fabric is an all-in-one analytics solution for enterprises that covers everything from data movement to data science, Real-Time Analytics, and business intelligence. It offers a comprehensive suite of services, including data lake, data engineering, and data integration, all in one place. This makes it an ideal platform for technical students and entrepreneurial developers looking to streamline their data engineering and analytics workflows.6.1KViews4likes1CommentSSIS Excel Connection Manager error
I'm having issues with excel destination in my SSIS package. I'm using a conditional split to send data to a spread sheet from OLE DB source. I feel the issue is because of the version of excel SSIS allows to choose in the connection manager window. I could be wrong. Other destinations like flat file or OLE DB are not giving issues. I recently upgraded Microsoft Office 365. Screen shots of error included here. Thank you for your help in advance.4KViews0likes3CommentsWhat is the best practices to implement business logic in SQL database?
Hi Everyone, I am currently struggling to understand where and how to implement business logic & aggregations in SQL database in an optimal way Currently I am using the following ETL process which takes forever and is quite costly. Therefore I would appreciate to get some tips on how to optimize it ETL process: A. SQL Azure database: 1- Temporary tables: Store recent data (last 6 weeks) 2- Incremental load of data from the Temporary tables into the dbo tables 3- dbo tables (Fact tables): Store historical sales data (Last 3 years) 4- Daily View: Built on top of dbo tables. It implements business logic on daily data (aggregates data & Join data with the dimension tables) 5- Weekly View: Built on top of Daily View and another dbo table. It calculate weekly rolling average and other heavy calculations B. Power BI: 6- Query the Daily View & Weekly View into one single PBIX. file2.7KViews0likes0CommentsIs the use of NVARCHAR(MAX) acceptable for this scenario?
Hi, I'm using Azure Data Factory (ADF) Pipelines to ingest several external datasources into our domain. As you'll know, I need to create a target database table for each source table I'm looking to ingest. Upon creating the target tables for the first time, I can look at the source tables field properties (datatype and size) and set those same properties for the target tables. My concern is if the source owners change the source field properties in the future and do not notify us (which is a strong possibility) then the ADF Pipelines may fail in which I will then investigate and resolve. There could be another scenario where source field A is 20 characters long, and so I set the target field to be 20 characters long, but then the source field is amended to be 50 characters long, and I'm not informed. This may not break the ADF Pipeline execution but simply truncate the data. An approach would be to set each target field to be NVARCHAR( MAX). This would (should) avoid the situation above. I'm a one-person band on all things data at my company and am attempting to juggle many things in the best way I can. I feel the NVARCHAR(MAX) approach would reduce headaches and needed time to investigate. Questions: 1) I understand it isn't good practice to use NVARCHAR(MAX) unless needed, but would you advise it acceptable with what I'm concerned about? 2) I understand using NVARCHAR(MAX) takes up more database size (allows for 2Gb) but if we're not actually filling that 2Gb up does it cost more in Azure SQL Server? The volume of data we have isn't great but I am still considering the costs involved. TLDR: Would setting target fields as NVARCHAR(MAX) increase Azure SQL Server costs even if the fields only contain 20 characters? Thanks in advance.Solved2.6KViews1like2Commentswhere should i start ssis or ssas
Hi i want to ask after installing and all .. first from where should i start.. like first i have SSIS package or SSAS paakcage? if SSIS first will be create then how i integrate that package in SSAS? kindly suggest.. i want to use adventurework database2.4KViews0likes14CommentsInserting new BusinessEntityID in AdventureWorks2017
How do you insert new BusinessEntityID's into Person.Person for multiple records? There are foreign key constraints on Person.BusinessEntity. I can create a new Person.BusinessEntity and output using: IF OBJECT_ID('tempdb..#bii') IS NOT NULL DROP TABLE dbo.#bii GO CREATE TABLE dbo.#bii ( BusinessEntityID int, rowguid varchar(200) NOT NULL, ModifiedDate datetime NOT NULL ) GO INSERT INTO [Person].[BusinessEntity] (rowguid) OUTPUT inserted.* INTO dbo.#bii VALUES (default) But not sure how to do this with multiple records from a staging table. ThxSolved2.3KViews0likes1Commenti doing SQL tuning in Company databases but i don't know where to start
i am doing SQL tuning in Company databases but i dont know where to start as i am new in DBA i joined new company where they have lots of databases, and it issue with databases, can anyone help me where to i start what should be step2KViews0likes2CommentsSql question
Hi Everyone, I have one sql problem to be solved 1. Image is the data 2.Image is the output that I should get. You need to output the dates, when Couriers changed their phone numbers. You shouldn't output the first phone number of a courier Through lead function I'm able to acheive, but I want to achieve it using joins 3. Image is the query that I used 4. Image is the output that I get I'm not sure how to get the output, using the query that I used, I have stucked in between Please help Thanks, Neha1.8KViews0likes2Comments