Giter VIP home page Giter VIP logo

jsonsqlserverroutines's Introduction

SQL Server and JSON: Data import, export and validation

This repository contains several stored procedures and PowerShell routines that can be used for inserting JSON data into SQL Server, validate the data or to export the data from SQL Server. They are described in a series of articles on the Red-Gate site and in Simple-Talk. Some use ordinary json files and others show how to include the schema and data in one document.

CreateJSONSchemaFromTable.sql

This temporary procedure creates a JSON schema from a table that matches the JSON you will get from doing a classic FOR JSON select * statemenmt on the entire table

ExampleofCreateJSONSchemaFromTable.sql

This code is an example of the sort of routine that prepares a schema and JSON from the contents of a table

BatchToSaveDataToDisk.sql

This is an example of a batch that creates a number of temporary procedures before saving the contents of a database to disk as JSON files that have both the schema and the data in one file.

SaveJsonDataFromTable.sql

This gets the JSON data from a table, taking into account all the problems that can come about such as dealing with CLR data types

SaveJSONDataToTable.sql

This saves a JSON file to a table, dealing with the complications of having old deprecated data types and CLR data types

SaveJSONToFile.sql

This is a utility stored procedure for saving text to a file It is designed to save as utf-8 for JSON files but will do any file

SelectJSONIntoTable.sql

This is a way of taking a JSON string that contains both the schema and the data, and inserting it into a table in the database you wish

ValidateViaJSONSchema.ps1

Shows how to validate a directory, with a subdirectory with the schema and a parallel directory with the data

jsonsqlserverroutines's People

Contributors

phil-factor avatar

Watchers

Dimitri Grinkevich 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.