SnowConvert AI - 스크립트 - 식별된 오브젝트

참고

이 설명서의 이 페이지는 Teradata 전용입니다.

모든 스크립트 파일(BTEQ, BTQ, FL, ML, TPUMP, TPT)에서 생성 또는 수정된 모든 데이터베이스 오브젝트의 분석입니다.

Teradata 평가 보고서의 스크립트 - 식별된 오브젝트 섹션

변환율 - 오브젝트

참고

오브젝트에 심각도 중간, 높음 또는 심각 문제가 없는 경우 마이그레이션이 성공한 것으로 간주합니다.

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.

공식

(successfully_converted_scripts_objects / total_scripts_objects) * 100

CSV 관련 필드 이름

  • 테이블: ScriptTableObjectConversionRate

  • 뷰: ScriptViewObjectConversionRate

  • 조인 인덱스: ScriptJoinIndexObjectConversionRate

  • 매크로: ScriptMacroObjectConversionRate

  • 프로시저: ScriptProcedureObjectConversionRate

  • 함수: ScriptFunctionObjectConversionRate

  • 트리거: ScriptTriggerObjectConversionRate

  • 인덱스: N/A

샘플

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()

예상 오브젝트 변환율: 50%

설명: 이전 샘플 코드를 사용하면 식별된 2개의 테이블 중 1개만 Snowflake로 성공적으로 마이그레이션되었으므로 오브젝트 변환률이 50%가 됩니다.

변환율 - 코드 라인(LOC)

파일 확장자별 코드 라인 변환 비율을 나타냅니다.

공식

(script_success_lines / script_total_lines) * 100

관련 CSV 필드 이름

  • 테이블: ScriptTableLoCConversionRate

  • 뷰: ScriptViewLocConversionRate

  • 조인 인덱스: ScriptJoinIndexLoCConversionRate

  • 매크로: ScriptMacroLoCConversionRate

  • 프로시저: ScriptProcedureLoCConversionRate

  • 함수: ScriptFunctionLoCConversionRate

  • 트리거: ScriptTriggerLoCConversionRate

  • 인덱스: N/A

샘플

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()

예상 LOC 변환율: 83.33 %

설명: 이전 샘플 코드의 경우, 입력 코드 (Associate_Id ANYTYPE!) 의 5번째 줄이 마이그레이션되지 않았고 총 6줄 중 5줄만 성공적으로 마이그레이션되었기 때문에 LOC 전환율은 83.33%가 됩니다.

참고

이 항목에 대한 자세한 내용은 설명서의 전환율 모드 섹션에서 확인할 수 있습니다.

Total Object Quantity

구문 분석 단계 중 SnowConvert AI로 식별되는 오브젝트의 총량을 나타냅니다.

CSV 관련 필드 이름

  • 테이블: ScriptTableTotalOccurrences

  • 뷰: ScriptViewTotalOccurrences

  • 조인 인덱스: ScriptJoinIndexTotalOccurrences

  • 매크로: ScriptMacroTotalOccurrences

  • 프로시저: ScriptProcedureTotalOccurrences

  • 함수: ScriptFunctionTotalOccurrences

  • 트리거: ScriptTriggerTotalOccurrences

  • 인덱스: ScriptIndexTotalOccurrences

샘플

-- 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()

예상 총 오브젝트 수량: 1.

설명: 하나의 테이블은 구문 분석 단계 중에 SnowConvert AI에 의해 완전히 구문 분석되었지만 다른 테이블에는 구문 분석 오류가 있어 SnowConvert AI가 테이블 오브젝트로 식별하지 못합니다.

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.

CSV 관련 필드 이름

  • 테이블: ScriptTableTotalLinesOfCode

  • 뷰: ScriptViewTotalLinesOfCode

  • 조인 인덱스: ScriptJoinIndexTotalLinesOfCode

  • 매크로: ScriptMacroTotalLinesOfCode

  • 프로시저: ScriptProcedureTotalLinesOfCode

  • 함수: ScriptFunctionTotalLinesOfCode

  • 트리거: ScriptTriggerTotalLinesOfCode

  • 인덱스: ScriptIndexTotalLinesOfCode

샘플

-- 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()

예상되는 코드 라인: 8

설명: 이 경우 CREATE TABLE 문에 사용되는 코드에서 6줄, 최상위 오브젝트 내부에 있는 설명에 2줄이 있습니다.

Parsing Errors

식별된 오브젝트 내부에 있는 구문 분석 오류의 수를 나타냅니다.

CSV 관련 필드 이름

  • 테이블: ScriptTableTotalParsingErrors

  • 뷰: ScriptViewTotalParsingErrors

  • 조인 인덱스: ScriptJoinIndexTotalParsingErrors

  • 매크로: ScriptMacroTotalLinesOfCode

  • 프로시저: ScriptProcedureTotalParsingErrors

  • 함수: ScriptFunctionTotalParsingErrors

  • 트리거: ScriptTriggerTotalParsingErrors

  • 인덱스: ScriptIndexTotalParsingErrors

샘플

-- 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()

예상되는 구문 분석 오류: 1

설명: SnowConvert AI가 첫 번째 테이블만 식별할 수 있었기 때문에 구문 분석 오류 열에는 하나의 구문 분석 오류만 보고됩니다. 두 번째 테이블은 식별되지 않았으므로 이러한 구문 분석 오류는 구문 분석 오류 열에 계산되지 않습니다.