GithubHelp home page GithubHelp logo

dbapipes's Introduction

dbapipes

The idea is to allow simple automation of data import and export between SQL Server database and text files with PowerShell.

It is possible to use dbatools to run a T-SQL script to query a database and then save it to a csv file, or to use the ImportExcel package to save it as an excel file. But it doesn't allow for easy scheduling, running and re-running data extracts (or perhaps imports) in groups or on regular bases.

Rather than running individual dbatools and ImportExcel commands, it should be possible to configure data sources, scripts and destinations to easily schedule regular execution of data extracts. It should be possible to add extra metadata to such configurations to help with execution over date ranges. For example a monthly data export could be run for a full year, or a daily for a month.

Get-DbaPipe -Name sample* | Invoke-DbaPipe -From '2020-01-01' -To '2020-03-31'

The above should be enough to run all defined data extracts with names starting with sample and invoke it on predefined servers/databases for dates between 2020-01-01 and 2020-03-31. If an extract is configured as monthly, it should produce 3 monthly output files, and any that is configured as daily should produce one output file per day within the date range. The files should be saved in predefined locations, or perhaps delivered remotely over sftp and such.

Constraints and assumptions

The objective is to 'pipe' data from one place to another. While a single task during individual execution might have multiple sources (to account for multi-tenant (or similar deployments) it should have single data output destination with a single staging mechanism selected for the execution. It should be possible to split the data in that staging or destination environment by some value derived from the data source to help with data separation.

Tasks or Pipes and Packages

Individiaul tasks is what gets executed and packages are just a convinient way to group the tasks. Something like Get-DbpPackage could be useful to review what has been deployed, what is available in a given environment but probably should not be used in the execution, where everything should be on task level

Get-DbpPipe -PackageName PackageA -Task TaskB | Invoke-DbpPipe

dbapipes's People

Contributors

michalporeba avatar

Watchers

 avatar  avatar

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.