Git Product home page Git Product logo

dwscripter's Introduction

Introduction

DWScripter is a scripting tool for Analytics Platform System and Azure SQLDW. This Console app will script the ddl and dml for both APS and SQLDW. Supports: PDW V2, Azure SQLDW, DDL and DML, schemas (version 2.4)

The project is intended as a cross platform tool, and as such is built on .NET Core SDK 2.0.2. You can build the solution and run the tool from the OS of your choice.

Requirements

PDWScripter requires Newtonsoft.json version 10.0.3 or above. You will need to add the package to your system. For more information and samples on how to add the package see Newtonsoft.json NuGet page.

Getting Started

Dowload the sources and build DWScripter tool. For building instructions see How To Contribute

The Solution contains two projects:

  1. PDWScripter
  2. DWScripter

PDWScripter is a class library project, made with the purpose of being reusable in custom projects to provide the Data Warehouse object scripting capability. For more information on using the library in your projects, please refer to PDWScripter How To and to PDWScripter License DWScripter is a console application that makes use of the PDWScripter library

DWScripter requires some paramters to identify the instance and databases to be scripted, as well as the object (DML, DDL or both).

You must invoke DWScripter passing all the required parameters. For more information on the tool usage see Usage

Current version is 1.1.0

See ChangeLog

USAGE

For more information on the tool usage see Usage

Contributing

If you are interested in fixing issues and contributing directly to the code base please see contributing guidelines

Please also review our Code of Conduct.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

dwscripter's People

Contributors

aisley avatar jackwagons avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar thomasbragaloni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dwscripter's Issues

Partitioned non-CCI tabels wrong clustered index definition

Expected Behavior

non-CCI partitioned tables with clustered index should only show the user created indexes

Actual Behavior

non-CCI partitioned tables with clustered indexes are scripted with an extra clustered index on the partition column

Steps to reproduce the behavior

Create a non-CCI partitioned table with a clustered index:
CREATE TABLE [Clustered_Partitioned] ( [INT_NO] INT NOT NULL, [DEV_NO] VARCHAR(10) NOT NULL, [DATE_NO] INT NOT NULL ) WITH (DISTRIBUTION=HASH(INT_NO), CLUSTERED INDEX ( [DEV_NO] ASC), PARTITION ([DATE_NO] RANGE LEFT FOR VALUES (20010101,20020101)))
Scripting this object will report:
CREATE TABLE [dbo].[Clustered_Partitioned] ( [INT_NO] int NOT NULL ,[DEV_NO] varchar (10) COLLATE Latin1_General_100_CI_AS_KS_WS NOT NULL ,[DATE_NO] int NOT NULL ) WITH ( DISTRIBUTION = HASH ([INT_NO]) , CLUSTERED INDEX ([DATE_NO]CLUSTERED INDEX ([DEV_NO]) , PARTITION ([DATE_NO] RANGE LEFT FOR VALUES (N'20010101' ,N'20020101')));
with the extra CLUSTERED INDEX on DATE_NO

Project Version

1.0.0

OS details

ALL

Exception thrown on Names with \

Expected Behavior

Create the script file

Actual Behavior

Throws an exception due to file name has a backslash contained in schema name.

Steps to reproduce the behavior

create a schema with a backslash, for example MSFT\dsabella.test, this will throw an exception when attempting to write the file due to it expecting another folder to be created for this file. Possible solution would be to just replace this in the filename with a character of _

Running this using the APS migration tool through powershell

Project Version

Beta

OS details

Win 10

timeout while scripting FULL database

Expected Behavior

execution should complete without errors

Actual Behavior

Execution aborts with time out error

Steps to reproduce the behavior

Run DWScripter with -M:FULL to script entire database against a database with high number of objects, tables with high number of partitions or unhealthy CCI tables

Project Version

1.0.0

OS details

ALL supported

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.