Sign inSign up

senzing/init-database

By senzing

•Updated 1 day ago

Image
0

10K+

senzing/init-database repository overview

⁠init-database

⁠:warning: WARNING: init-database is still in development :warning: _

At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x. Although it can be reviewed and commented on, the recommendation is not to use it yet.

⁠Synopsis

init-database is a command in the senzing-tools⁠ suite of tools. This command initialize databases with a Senzing schema and a default Senzing configuration.

Go Reference Go Report Card go-test.yaml License

⁠Overview

init-database performs the following:

  1. Creates a Senzing database schema from a file of SQL statements. The SQL file is identified by the SENZING_TOOLS_SQL_FILE⁠ parameter. The default file name depends on the database engine specified in the protocol section of SENZING_TOOLS_DATABASE_URL⁠ or the database(s) specified in SENZING_TOOLS_ENGINE_CONFIGURATION_JSON⁠. The default file location depends on the Senzing engine configuration JSON's PIPELINE.RESOURCEPATH value.
  2. Creates a Senzing configuration in the database based on the contents of the file specified by the SENZING_TOOLS_ENGINE_CONFIGURATION_FILE⁠ parameter. The default file location is based on the Senzing engine configuration JSON's PIPELINE.RESOURCEPATH value.
  3. Optionally: Adds datasources to the initial Senzing configuration via the SENZING_TOOLS_DATASOURCES⁠ parameter.

⁠Install

  1. The init-database command is installed with the senzing-tools⁠ suite of tools. See senzing-tools install⁠.

⁠Use

export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools init-database [flags]
  1. For options and flags:

    1. Online documentation⁠

    2. Runtime documentation:

      export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
      senzing-tools init-database --help
      
  2. In addition to the following simple usage examples, there are additional Examples⁠.

⁠Using command line options
  1. :pencil2: Specify database using command line option. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    senzing-tools init-database \
        --database-url postgresql://username:[email protected]:5432/G2
    
  2. See Parameters⁠ for additional parameters.

⁠Using environment variables
  1. :pencil2: Specify database using environment variable. Example:

    export SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected]:5432/G2
    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    senzing-tools init-database
    
  2. See Parameters⁠ for additional parameters.

⁠Using Docker

This usage shows how to initialze a database with a Docker container.

  1. :pencil2: Run senzing/senzing-tools. Example:

    docker run \
        --env SENZING_TOOLS_COMMAND=init-database \
        --env SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected]:5432/G2 \
        --rm \
        senzing/senzing-tools
    
  2. See Parameters⁠ for additional parameters.

⁠Parameters

⁠References

Tag summary

Content type

Image

Digest

sha256:884a47df1…

Size

370.3 MB

Last updated

1 day ago

docker pull senzing/init-database