SnowConvert AI – Skripte – Identifizierte Objekte

Bemerkung

Diese Seite der Dokumentation gilt nur für Teradata.

Die Aufschlüsselung aller Datenbankobjekte, die in allen Skriptdateien erstellt oder geändert wurden (BTEQ, BTQ, FL, ML, TPUMP, TPT).

Der Abschnitt „Scripts - Identified Objects“ des Bewertungsberichts für Teradata

Conversion Rate - Object

Bemerkung

Ein Objekt gilt als erfolgreich migriert, wenn es keine Probleme mit mittlerem, hohem oder kritischem Schweregrad aufweist.

Represents the percentage of identified objects by SnowConvert AI that were successfully migrated. This helps determine the number of objects that were successfully migrated and the objects that need manual work to complete the migration of the objects to Snowflake. If N/A is listed in the column, it means that the object type is not supported in Snowflake. A „-“ could also be listed in this column. This means that the set of files migrated by SnowConvert AI did not contain objects of the specific type that could be identified.

Formel

(successfully_converted_scripts_objects / total_scripts_objects) * 100

Zu CSV zugeordnete Feldnamen

  • Tables: ScriptTableObjectConversionRate

  • Views: ScriptViewObjectConversionRate

  • Join Index: ScriptJoinIndexObjectConversionRate

  • Macro: ScriptMacroObjectConversionRate

  • Procedures: ScriptProcedureObjectConversionRate

  • Functions: ScriptFunctionObjectConversionRate

  • Triggers: ScriptTriggerObjectConversionRate

  • Indizes: N/A

Beispiel

CREATE SET TABLE Tables_Database.Employee
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);

CRATE SET TABLE Tables_Database.Employee2
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);
#*** Generated code is based on the SnowConvert AI Python Helpers version 2.0.6 ***

import os
import sys
import snowconvert.helpers
from snowconvert.helpers import Export
from snowconvert.helpers import exec
from snowconvert.helpers import BeginLoading
con = None
def main():
  snowconvert.helpers.configure_log()
  con = snowconvert.helpers.log_on()
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee (
      Associate_Id INTEGER,
      UNIQUE (Associate_Id)
    )
    """)
  #** SSC-EWI-0001 - UNRECOGNIZED TOKEN ON LINE '5' COLUMN '1' OF THE SOURCE CODE STARTING AT 'CRATE'. EXPECTED 'STATEMENT' GRAMMAR. LAST MATCHING TOKEN WAS 'CRATE' ON LINE '5' COLUMN '1'. CODE '81'. **
  #
  #--CRATE SET TABLE Tables_Database.Employee2
  #--   (Associate_Id     INTEGER)
  #--UNIQUE PRIMARY INDEX (Associate_Id)

  snowconvert.helpers.quit_application()

if __name__ == "__main__":
  main()

Erwartete Objektkonvertierungsrate: 50 %

Erläuterung: Mit dem obigen Beispielcode haben wir eine Objektkonvertierungsrate von 50 %, da nur 1 der 2 identifizierten Tabellen erfolgreich nach Snowflake migriert wurde.

Conversion Rate - LOC

Zeigt den prozentualen Anteil der Konvertierung von Codezeilen pro Dateierweiterung an.

Formel

(script_success_lines / script_total_lines) * 100

Zugehörige CSV-Feldnamen

  • Tables: ScriptTableLoCConversionRate

  • Views: ScriptViewLocConversionRate

  • Join Index: ScriptJoinIndexLoCConversionRate

  • Macros: ScriptMacroLoCConversionRate

  • Procedures: ScriptProcedureLoCConversionRate

  • Functions: ScriptFunctionLoCConversionRate

  • Triggers: ScriptTriggerLoCConversionRate

  • Indizes: N/A

Beispiel

CREATE SET TABLE Tables_Database.Employee
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);

CREATE SET TABLE Tables_Database.Employee2
   (Associate_Id     ANYTYPE!)
UNIQUE PRIMARY INDEX (Associate_Id);
#*** Generated code is based on the SnowConvert AI Python Helpers version 2.0.6 ***

import os
import sys
import snowconvert.helpers
from snowconvert.helpers import Export
from snowconvert.helpers import exec
from snowconvert.helpers import BeginLoading
con = None
def main():
  snowconvert.helpers.configure_log()
  con = snowconvert.helpers.log_on()
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee (
      Associate_Id INTEGER,
      UNIQUE (Associate_Id)
    )
    """)
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee2 (
-- ** SSC-EWI-0001 - UNRECOGNIZED TOKEN ON LINE '6' COLUMN '5' OF THE SOURCE CODE STARTING AT 'Associate_Id'. EXPECTED 'Column Definition' GRAMMAR. LAST MATCHING TOKEN WAS 'ANYTYPE' ON LINE '6' COLUMN '22'. CODE '15'. **
--                                                       Associate_Id     ANYTYPE!,
      UNIQUE (Associate_Id)
    )
    """)
  snowconvert.helpers.quit_application()

if __name__ == "__main__":
  main()

Erwartete LOC-Konvertierungsrate: 83,33 %

Erläuterung: Mit dem vorherigen Beispielcode haben wir eine Konvertierungsrate von 83,33 % Codezeilen (LOC) weil Zeile 5 des Eingabecodes (Associate_Id ANYTYPE!) nicht migriert werden konnte und nur 5 der insgesamt 6 Codezeilen erfolgreich migriert wurden.

Bemerkung

Weitere Informationen zu diesem Thema finden Sie im Abschnitt Modi der Konvertierungsrate in unserer Dokumentation.

Total Object Quantity

Stellt die Gesamtzahl der Objekte dar, die von SnowConvert AI während der Parsing-Phase identifiziert wurden.

Zu CSV zugeordnete Feldnamen

  • Tables: ScriptTableTotalOccurrences

  • Views: ScriptViewTotalOccurrences

  • Join Index: ScriptJoinIndexTotalOccurrences

  • Macros: ScriptMacroTotalOccurrences

  • Procedures: ScriptProcedureTotalOccurrences

  • Functions: ScriptFunctionTotalOccurrences

  • Triggers: ScriptTriggerTotalOccurrences

  • Indexes: ScriptIndexTotalOccurrences

Beispiel

-- Successfully parsed table.
CREATE SET TABLE Tables_Database.Employee
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);

-- Table with a parsing error that could not be identified.
CRATE SET TABLE Tables_Database.Employee2
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);
#*** Generated code is based on the SnowConvert AI Python Helpers version 2.0.6 ***

import os
import sys
import snowconvert.helpers
from snowconvert.helpers import Export
from snowconvert.helpers import exec
from snowconvert.helpers import BeginLoading
con = None
def main():
  snowconvert.helpers.configure_log()
  con = snowconvert.helpers.log_on()
  # Successfully parsed table.
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee (
      Associate_Id INTEGER,
      UNIQUE (Associate_Id)
    )
    """)
  #** SSC-EWI-0001 - UNRECOGNIZED TOKEN ON LINE '7' COLUMN '1' OF THE SOURCE CODE STARTING AT 'CRATE'. EXPECTED 'STATEMENT' GRAMMAR. LAST MATCHING TOKEN WAS 'CRATE' ON LINE '7' COLUMN '1'. CODE '81'. **
  #
  #---- Table with a parsing error that could not be identified.
  #--CRATE SET TABLE Tables_Database.Employee2
  #--   (Associate_Id     INTEGER)
  #--UNIQUE PRIMARY INDEX (Associate_Id)

  snowconvert.helpers.quit_application()

if __name__ == "__main__":
  main()

Erwartete Gesamtobjektmenge: 1.

Erläuterung: Eine Tabelle wurde von SnowConvert AI während der Parsing-Phase vollständig analysiert, die andere Tabelle weist aber einen Parsing-Fehler auf, der dazu führt, dass SnowConvert AI sie nicht als Tabellenobjekt identifiziert.

Lines of Code

Represents the total number of lines of code for the identified top-level objects. It is important to take into account that the lines of code of the top-level object, as well as the comments, are used for this column. On the other hand, empty lines will not be counted in this column.

Zu CSV zugeordnete Feldnamen

  • Tables: ScriptTableTotalLinesOfCode

  • Views: ScriptViewTotalLinesOfCode

  • Join Index: ScriptJoinIndexTotalLinesOfCode

  • Macros: ScriptMacroTotalLinesOfCode

  • Procedures: ScriptProcedureTotalLinesOfCode

  • Functions: ScriptFunctionTotalLinesOfCode

  • Triggers: ScriptTriggerTotalLinesOfCode

  • Indexes: ScriptIndexTotalLinesOfCode

Beispiel

-- Hello World
CREATE SET TABLE Tables_Database.Employee
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);

CREATE SET TABLE Tables_Database.Employee2
   (-- hello world
   Associate_Id     ANYTYPE!)
UNIQUE PRIMARY INDEX (Associate_Id);
#*** Generated code is based on the SnowConvert AI Python Helpers version 2.0.6 ***

import os
import sys
import snowconvert.helpers
from snowconvert.helpers import Export
from snowconvert.helpers import exec
from snowconvert.helpers import BeginLoading
con = None
def main():
  snowconvert.helpers.configure_log()
  con = snowconvert.helpers.log_on()
  # Hello World
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee (
      Associate_Id INTEGER,
      UNIQUE (Associate_Id)
    )
    """)
  # hello world
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee2 (
-- ** SSC-EWI-0001 - UNRECOGNIZED TOKEN ON LINE '8' COLUMN '4' OF THE SOURCE CODE STARTING AT 'Associate_Id'. EXPECTED 'Column Definition' GRAMMAR. LAST MATCHING TOKEN WAS 'ANYTYPE' ON LINE '8' COLUMN '21'. CODE '15'. **
--   Associate_Id     ANYTYPE!,
      UNIQUE (Associate_Id)
    )
    """)
  snowconvert.helpers.quit_application()

if __name__ == "__main__":
  main()

Erwartete Anzahl von Codezeilen: 8

Erläuterung: In diesem Fall haben wir 6 Zeilen, die aus dem Code für die CREATE TABLE-Anweisungen stammen, und 2 für Kommentare, die sich innerhalb der Objekte der obersten Ebene befinden.

Parsing Errors

Stellt die Anzahl der Parsing-Fehler dar, die sich innerhalb der identifizierten Objekte befinden.

Zu CSV zugeordnete Feldnamen

  • Tables: ScriptTableTotalParsingErrors

  • Views: ScriptViewTotalParsingErrors

  • Join Index: ScriptJoinIndexTotalParsingErrors

  • Macros: ScriptMacroTotalLinesOfCode

  • Procedures: ScriptProcedureTotalParsingErrors

  • Functions: ScriptFunctionTotalParsingErrors

  • Triggers: ScriptTriggerTotalParsingErrors

  • Indexes: ScriptIndexTotalParsingErrors

Beispiel

-- Successfully parsed table.
CREATE SET TABLE Tables_Database.Employee
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);

-- Table with a parsing error that could not be identified.
CRATE SET TABLE Tables_Database.Employee2
   (Associate_Id     INTEGER)
UNIQUE PRIMARY INDEX (Associate_Id);
#*** Generated code is based on the SnowConvert AI Python Helpers version 2.0.6 ***

import os
import sys
import snowconvert.helpers
from snowconvert.helpers import Export
from snowconvert.helpers import exec
from snowconvert.helpers import BeginLoading
con = None
def main():
  snowconvert.helpers.configure_log()
  con = snowconvert.helpers.log_on()
  # Successfully parsed table.
  exec("""
    --** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT HAVE DUPLICATE ROWS **
    CREATE OR REPLACE TABLE Tables_Database.Employee (
      Associate_Id INTEGER,
      UNIQUE (Associate_Id)
    )
    """)
  #** SSC-EWI-0001 - UNRECOGNIZED TOKEN ON LINE '7' COLUMN '1' OF THE SOURCE CODE STARTING AT 'CRATE'. EXPECTED 'STATEMENT' GRAMMAR. LAST MATCHING TOKEN WAS 'CRATE' ON LINE '7' COLUMN '1'. CODE '81'. **
  #
  #---- Table with a parsing error that could not be identified.
  #--CRATE SET TABLE Tables_Database.Employee2
  #--   (Associate_Id     INTEGER)
  #--UNIQUE PRIMARY INDEX (Associate_Id)

  snowconvert.helpers.quit_application()

if __name__ == "__main__":
  main()

Erwartete Parsing-Fehler: 1

Erläuterung: In der Spalte Parsing-Fehler wird nur ein Parsing-Fehler gemeldet, da SnowConvert AI nur die erste Tabelle identifizieren konnte. Da die zweite Tabelle nicht identifiziert wurde, werden diese Parsing-Fehler nicht in der Spalte Parsing-Fehler gezählt.