SnowConvert AI - Scripts - Identified Objects¶
Note
Cette page de la documentation concerne uniquement Teradata.
La répartition de tous les objets de la base de données créés ou modifiés dans tous les fichiers de script (BTEQ, BTQ, FL, ML, TPUMP, TPT).
Taux de conversion - Objet¶
Note
Un objet est considéré comme migré avec succès s’il ne présente pas de problèmes de gravité moyenne, élevée ou critique.
Represents the percentage of identified objects by SnowConvert AI that were successfully migrated. This will help to determine the number of objects that were successfully migrated and the objects that need manual work in order 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.
Formule¶
(successfully_converted_scripts_objects / total_scripts_objects) * 100
Noms des champs associés CSV¶
Tables : ScriptTableObjectConversionRate
Vues : ScriptViewObjectConversionRate
Index de la jointure : ScriptJoinIndexObjectConversionRate
Macro : ScriptMacroObjectConversionRate
Procédures : ScriptProcedureObjectConversionRate
Fonctions : ScriptFunctionObjectConversionRate
Déclencheurs : ScriptTriggerObjectConversionRate
Index : N/A
Exemple¶
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()
Taux de conversion des objets attendu : 50 %
Explication : Avec l’exemple de code précédent, nous aurons un taux de conversion des objets de 50 % car seule 1 des 2 tables identifiées a été migrée avec succès vers Snowflake.
Taux de conversion - Lignes de code (LOC)¶
Indique le pourcentage de conversion de lignes de code par extension de fichier.
Formule¶
(script_success_lines / script_total_lines) * 100
Noms des champs CSV associés¶
Tables : ScriptTableLoCConversionRate
Vues : ScriptViewLocConversionRate
Index de la jointure : ScriptJoinIndexLoCConversionRate
Macros : ScriptMacroLoCConversionRate
Procédures : ScriptProcedureLoCConversionRate
Fonctions : ScriptFunctionLoCConversionRate
Déclencheurs : ScriptTriggerLoCConversionRate
Index : N/A
Exemple¶
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()
Taux de conversion LOC attendu : 83,33 %
Explication : Dans l’exemple de code précédent, nous aurons un taux de conversion LOC de 83,33 % car la ligne 5 du code d’entrée (Associate_Id ANYTYPE!)
n’a pas pu être migrée et seules 5 des 6 lignes de code totales ont été migrées avec succès.
Note
Vous trouverez de plus amples informations à ce sujet dans la section Modes de taux de conversion de notre documentation.
Quantité totale d’objets¶
Represents the total amount of objects identified by SnowConvert AI during the parsing phase.
Noms des champs associés CSV¶
Tables : ScriptTableTotalOccurrences
Vues : ScriptViewTotalOccurrences
Index de la jointure : ScriptJoinIndexTotalOccurrences
Macros : ScriptMacroTotalOccurrences
Procédures : ScriptProcedureTotalOccurrences
Fonctions : ScriptFunctionTotalOccurrences
Déclencheurs : ScriptTriggerTotalOccurrences
Index : ScriptIndexTotalOccurrences
Exemple¶
-- 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()
Quantité totale d’objets prévue : 1.
Explanation: One table was completely parsed by SnowConvert AI during the parsing phase but the other table has a parsing error that causes SnowConvert AI to not identify it as a table object.
Lignes de code¶
Représente la quantité totale de lignes de code utilisées pour les objets de niveau supérieur identifiés. Il est important de tenir compte du fait que les lignes de code de l’objet de niveau supérieur ainsi que les commentaires sont utilisés pour cette colonne. D’autre part, les lignes vides ne seront pas comptabilisées dans cette colonne.
Noms des champs associés CSV¶
Tables : ScriptTableTotalLinesOfCode
Vues : ScriptViewTotalLinesOfCode
Index de la jointure : ScriptJoinIndexTotalLinesOfCode
Macros : ScriptMacroTotalLinesOfCode
Procédures : ScriptProcedureTotalLinesOfCode
Fonctions : ScriptFunctionTotalLinesOfCode
Déclencheurs : ScriptTriggerTotalLinesOfCode
Index : ScriptIndexTotalLinesOfCode
Exemple¶
-- 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()
Lignes de code attendues : 8
Explication : Dans ce cas, nous avons 6 lignes qui proviennent du code utilisé pour les instructions CREATE TABLE
et 2 pour les commentaires qui se trouvent à l’intérieur des objets de niveau supérieur.
Erreurs d’analyse¶
Représente le nombre d’erreurs d’analyse qui se trouvent à l’intérieur des objets identifiés.
Noms des champs associés CSV¶
Tables : ScriptTableTotalParsingErrors
Vues : ScriptViewTotalParsingErrors
Index de la jointure : ScriptJoinIndexTotalParsingErrors
Macros : ScriptMacroTotalLinesOfCode
Procédures : ScriptProcedureTotalParsingErrors
Fonctions : ScriptFunctionTotalParsingErrors
Déclencheurs : ScriptTriggerTotalParsingErrors
Index : ScriptIndexTotalParsingErrors
Exemple¶
-- 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()
Erreurs d’analyse attendues : 1
Explanation: Only one parsing error will be reported in the Parsing Errors column because SnowConvert AI was able to only identify the first table. Since the second table was not identified, those parsing errors will not be counted in the Parsing Errors column.