你好,
我測試使用變化數據捕獲和創建一些三角洲住表有問題,生成的視圖創建的小寫列名。這是我的功能我用攝取數據:
def raw_to_ods_merge (table_name source_stream file_description,
ods_path、primary_keys、序列、table_prop column_comments):
ingest_name = table_name +“_ingest”
輸出= source_stream \
.withColumn (ETL_InputFile, F.input_file_name ()) \
.withColumn (ETL_LoadDate, F.lit (datetime.datetime.now ()))
@dlt.view (
name = ingest_name
)
def source_ingest ():
返回(輸出)
dlt。create_target_table (name = table_name
評論= file_description,
路徑= ods_path,
table_properties = table_prop,
模式= output.schema
)
dlt.apply_changes (
目標= table_name,
= ingest_name來源,
鍵= primary_keys,
sequence_by =序列
)
這是導致一個__apply_change…表名和列名在大小寫混合。然而,創建輸出列名稱設置為小寫。如。
“原始”創建視圖。“shopper_panel_korea”(
“持續時間”評論“的時間長度的度量應用。,
”時期“評論”指標申請的日期,結束日期範圍。,
“產品”,
“spend_1000000_krw”,
“product_percent_of_category_value”,
“retailer_percent_of_value”,
“volume_1000_kg”,
“product_percent_of_category_volume_1kg”,
“retailer_percent_of_volume_1kg”,
“buyers_1000”,
“penetration_percent”,
“頻率”,
“trips_1000”,
“性能”,
“通道”,
“domestic_or_import”,
“etl_inputfile”,
“etl_loaddate”)
TBLPROPERTIES (
' transient_lastDdlTime ' = ' 1651620122 ')
選擇“時間”、“時期”、‘產品’,‘Spend_1000000_KRW’,‘Product_Percent_of_Category_Value’,‘Retailer_Percent_of_Value’,‘Volume_1000_kg’,‘Product_Percent_of_Category_Volume_1kg’,‘Retailer_Percent_of_Volume_1kg’,‘Buyers_1000’,“Penetration_Percent”、“頻率”、“Trips_1000”,“表現”、“通道”,“Domestic_or_Import”,“ETL_InputFile”、“ETL_LoadDate”從“生”。__apply_changes_storage_shopper_panel_korea __DeleteVersion是NULL
有什麼我做錯了或這是一個問題嗎?
提前感謝你的幫助,
斯圖