metad.connectors package

Module contents

The connectors module provides classes for importing data from external data sources such as MySQL.

Classes

DataFrameConnector(tables)

Import data from pandas DataFrames.

MySQLConnector(host, port, user, password, …)

Import data from MySQL instances.

class metad.connectors.DataFrameConnector(tables)[source]

Bases: metad.connectors.base.BaseConnector

Import data from pandas DataFrames.

The DataFrameConnector allows you to import data from pandas DataFrames. It automatically populates the tables and fields; it also infers the data types from the data.

Methods

export_metadata(path_to_json)

Write the metadata to a JSON file.

export_tables(path_to_output)

Write the tables to CSV files.

export_metadata(path_to_json)[source]

Write the metadata to a JSON file.

Parameters

path_to_json (str) – The path to the output JSON.

export_tables(path_to_output)[source]

Write the tables to CSV files.

Parameters

path_to_output (str) – The path to the output directory.

class metad.connectors.MySQLConnector(host, port, user, password, database)[source]

Bases: metad.connectors.base.BaseConnector

Import data from MySQL instances.

The MySQLConnector allows you to import data from a MySQL instance by translating the data types and exporting the primary / foreign key constraints from the schema table.

Methods

export_metadata(path_to_json)

Write the metadata to a JSON file.

export_tables(path_to_output)

Write the tables to CSV files.

export_metadata(path_to_json)[source]

Write the metadata to a JSON file.

Parameters

path_to_json (str) – The path to the output JSON.

export_tables(path_to_output)[source]

Write the tables to CSV files.

Parameters

path_to_output (str) – The path to the output directory.