Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Read


Description:

This Snap outputs a list of tables in a database. The Snap will connect to the database, read its metadata, and output a document for each table found in the database. The table names are output in a topological order so that tables with the fewest dependencies are output first. In other words, if table A has a foreign key reference to table B, then table B will be output before A. The ordering is intended to ease the process of replicating a group of tables from one database to another.

Replicating a Subset of Tables

The output of the Table List Snap can be directly used to replicate an entire database.  However, if you are only interested in a subset of tables, you can use a Filter Snap to select the table names you are interested in as well as the tables that they reference. For example, given the following diamond-shaped table graph where A depends on B and C and they both depend on D:
 

  A
 / \
B   C
 \ /
  D

      

The Table List will output the following documents:


name=D; dependents=[A, B, C, D]
name=C; dependents=[A, C]
name=B; dependents=[A, B]
name=A; dependents=[A]


So, if you wanted to copy just table 'A' and its dependencies, you can add a Filter Snap with the following expression: 

$.dependents.indexOf('A') != -1


The filter will then remove any extra tables that happen to be in the schema. 

ETL Transformations & Data Flow

This Snap enables the following ETL operations/flows:

Extract data from Azure SQL.

This Snap submits a JDBC call to Azure SQL to get the table metadata and writes the results to the output view.

  1. The Snap collects the user account information, the Workday service, object, and output fields for the Workday server to retrieve.
  2. The Snap evaluates any defined property expressions and then creates and submits a SOAP request with authentication.
  3. On successful Workday server response, the Snap converts the returned SOAP XML response into JSON for the output view.
  4. If there is an exception, the Snap writes an error to the output view.


Input & Output

  • Input: [Optional] This Snap can have an upstream Snap that can pass a document output view. Such as Structure or JSON Generator.
  • Output: Documents with the following fields:
    • name -  The fully-qualified name of the table. To use the table name in another Snap, like a Select or Insert, you can pass it through a ForEach Snap to another pipeline with the Select or Insert.
    • type - The type of table. This value is currently fixed to the string "TABLE".
    • dependents - (If Compute table graph is selected) A list of table names that have references to this table, including this table.


Note

While trying to access a column name that contains specific characters as supported by Azure SQL such as $, #, @ etc., such field names should be enclosed in the square brackets.

Modes


Prerequisites:

This Snap supports SQL Server 2008 or newer.


Limitations and Known Issues:

NoneWorks in Ultra Task Pipelines.

Configurations: 

Account & Access

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Azure SQL Account for information on setting up this type of account.

Views

InputThis Snap has at most one document input view.
OutputThis Snap has at most one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Troubleshooting:

Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Schema Name


The database schema name. Selecting a schema filters the Table name list to show only those tables within the selected schema. The property is suggestible and will retrieve available database schemas during suggest values.

Example: test

Default value: [None]


Compute table graph

Computes the dependents among tables and returns each table with a list of tables it has foreign key references to. The ordering of outputted tables is from least dependent to most-dependent. Note that as turning on this option will significantly slow down the Snap, it should be left as off unless you need it.

Default value: Not Selected


Basic Use Case

The following pipeline describes how the Snap functions as a standalone Snap in a pipeline:

In the following example, the Table List Snap retrieves all the tables under schema 'dbo' and writes it to the output view. Note the Compute table graph property is selected and hence the output view displays the dependents among the table with foreign key references.


The sample output view data is shown below:



Typical Snap Configurations

The key configurations for the Snap are:

Without Expression: Directly selecting the schema name from the suggestible list:

  • With Expressions

    • Query from an upstream Snap: The Mapper Snap passing the required schema name via the upstream.

    • Pipeline Parameter: Pipeline parameter set to pass the required schema name to list out all the tables under it.


Downloads

Attachments
patterns.*slp, .*zip

Excerpt Include
Azure SQL Snap Pack
Azure SQL Snap Pack
nopaneltrue