Git Product home page Git Product logo

nzcode's Introduction

Overview

nz_util.sh is a shell script providing a collection of functions for common database operations on Netezza Performance Server (NPS). These utility functions facilitate tasks such as statistics gathering, table truncation, data loading from various file formats, command execution, CSV file writing, and more.

Functions

  • GatherStats: Gathers statistics for a specified table in a Netezza database.
  • TruncateTable: Truncates a specified table in a Netezza database.
  • LoadFromFixedFile: Loads data from a fixed-length file into a Netezza table.
  • LoadFromDelimited: Loads data from a delimited file into a Netezza table.
  • LoadFromSQL: Loads data into a Netezza table using an SQL insert script.
  • ExecuteCommand: Executes a given command in a Netezza database.
  • WriteCSV: Writes query results to a CSV file.
  • GroomTable: Executes the GROOM TABLE command for a specified table.
  • CreateLoadTable: Creates a table in Netezza for loading data.
  • CreateLoadTableDelimited: Creates a delimited table in Netezza for loading data.
  • TouchNZTable: Checks if a specified table exists in a database.
  • NzEzLoader: A comprehensive function that automates the process of loading data into a Netezza table.

Usage

To use these functions in your shell scripts, source nz_util.sh as follows:

source /path/to/nz_util.sh

GatherStats "my_table" "my_database"

TruncateTable "my_table" "my_database"

Requirements

A Netezza Performance Server environment. Appropriate permissions to execute database operations.

Author

Tom McGeehan

nzcode's People

Contributors

tfmv avatar

Watchers

James Cloos 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.