azure-sqldw

sqlcmd on Azure SQL Data Warehouse - SqlState 24000, Invalid cursor state after INSERT statement

三世轮回 提交于 2019-12-12 19:03:22
问题 I am working on a script to reload a table using SQLCMD on Linux connecting to an Azure SQL Data Warehouse database. After the INSERT statement completes, the next statement fails (but does not end the sqlcmd execution) with the "warning" insert into schema.table_temp ( ...list of columns ) select ...list of columns from schema.table ; GO (COMMENT--> in script, but not echoed in log.) (0 rows affected) IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES t WHERE TABLE_TYPE = 'BASE

IDENTITY not generating sequential values

 ̄綄美尐妖づ 提交于 2019-12-11 08:03:43
问题 I am running the below query to create a dimension table; however the identity column is not yielding sequential values; the values are very random. Any reason for this? I have tried a stored procedure and also a manual insert; but the result is the same CREATE TABLE Dim.CDIM_State ( intStateDimKey int IDENTITY(1,1) NOT NULL, txtState nvarchar(250), dtCreatedOn datetime, dtModifiedOn datetime ) WITH ( DISTRIBUTION = REPLICATE, CLUSTERED COLUMNSTORE INDEX ) The output is something like this; I

Testing Azure SQL DW Concurrency shows internally Azure is not running procedures concurrently

主宰稳场 提交于 2019-12-11 05:48:56
问题 I have read the Azure Concurrency and workload management in SQL Data Warehouse https://azure.microsoft.com/en-us/documentation/articles/sql-data-warehouse-develop-concurrency/ and understand the limits placed on the number of concurrent queries one can use based on scale, but what I cannot understand and thus raising the question here is when testing what the document states, I cannot get the results Azure claims are true. Running queries concurrently is still taking almost as long as

Extract SQL Azure Federated Database to Data Warehouse with SSIS

荒凉一梦 提交于 2019-12-11 02:26:34
问题 I am trying to transfer our production data to a data warehouse for reporting purposes. I've tried following the "Importing to Federations" section from the SSIS for Azure and Hybrid Data Movement, but I need to move data from my federations to the data warehouse. I've also found a good resource at SQL Server Central, but I still can't seem to bring up the federated tables in the data flow wizards. Nor can I add a Use FedDB statement in a SQL command in the ODBC (connection type needed for a

SQL Data warehouse: Incorrect syntax near 'OFFSET'

给你一囗甜甜゛ 提交于 2019-12-11 00:33:21
问题 I am trying out few functionalities in SQL data warehouse. I was trying out OFFSET with sample dataset provided with SQL data warehouse. I got error: Incorrect syntax near 'OFFSET' . I have checked the database compatibility version and it is 130(SQL Server 2016). Following is the query I am trying: SELECT [SalesQuotaKey] ,[EmployeeKey] ,[DateKey] ,[CalendarYear] ,[CalendarQuarter] ,[SalesAmountQuota] FROM [dbo].[FactSalesQuota] order by [SalesAmountQuota] desc OFFSET 0 ROWS FETCH NEXT 10

Polybase create external datasource giving syntax error

给你一囗甜甜゛ 提交于 2019-12-10 15:06:37
问题 I'm trying to execute the following command in Azure Data Warehouse: CREATE EXTERNAL DATA SOURCE Brand WITH (TYPE=HADOOP, LOCATION ='wasbs://brand@mywarehouse.blob.core.windows.net' CREDENTIAL = StorageCred); And I get this error message: Incorrect syntax near 'HADOOP'. I've tried it with and with the command after hadoop, nothing seems to work. Azure Data Warehouse reports version 13.0.400 and I've tried with two versions of SQL Management Studio with the most recent being version 13.0.600

Parent child hierarchy path without using CTE

安稳与你 提交于 2019-12-10 11:26:12
问题 Hi I have following tables: create table Features ( FeatureId bigint, FeatureName varchar(255), ParentId bigint ) insert into Features values(10, 'Feature 1', 1); insert into Features values(11, 'Feature 2', 10); insert into Features values(12, 'Feature 3', 11); insert into Features values(13, 'Feature 4', 2); insert into Features values(14, 'Feature 5', 13); insert into Features values(15, 'Feature 6', 3); insert into Features values(16, 'Feature 7', 15); insert into Features values(17,

Azure SQL Data Warehouse DWU vs Azure SQL DTU

你。 提交于 2019-12-07 03:18:22
问题 I am considering migration from Azure SQL to Azure SQL Data Warehouse. It seems to offer some of the features that we need, however price is a concern for starting small. 100 DWU Data Warehouse is priced considerably higher ($521/month) than a seemingly comparable 100 DTU Azure SQL S2 tier ($150/month). To make sure I am comparing apples to apples, can someone shed some light on how DWU compare to DTU (assuming basic configuration with a single database)? Edit: to everyone who is inclined to

Parent child hierarchy path without using CTE

一个人想着一个人 提交于 2019-12-06 13:39:13
Hi I have following tables: create table Features ( FeatureId bigint, FeatureName varchar(255), ParentId bigint ) insert into Features values(10, 'Feature 1', 1); insert into Features values(11, 'Feature 2', 10); insert into Features values(12, 'Feature 3', 11); insert into Features values(13, 'Feature 4', 2); insert into Features values(14, 'Feature 5', 13); insert into Features values(15, 'Feature 6', 3); insert into Features values(16, 'Feature 7', 15); insert into Features values(17, 'Feature 8', 16); insert into Features values(18, 'Feature 9', 17); insert into Features values(19,

Time-based drilldowns in Power BI powered by Azure Data Warehouse

社会主义新天地 提交于 2019-12-05 13:24:28
I have designed a simple Azure Data Warehouse where I want to track stock of my products on periodic basis. Moreover I want to have an ability to see that data grouped by month, weeks, days and hours with ability to drill down from top to bottom. I have defined 3 dimensions: DimDate DimTime DimProduct I have also defined a Fact table to track product stocks: FactStocks - DateKey (20160510, 20160511, etc) - TimeKey (0..23) - ProductKey (Product1, Product2) - StockValue (number, 1..9999) My fact sample data is below: 20160510 20 Product1 100 20160510 20 Product2 30 20160510 21 Product1 110