@@ -30,7 +30,11 @@ def get_or_create_spark_session(dialect: str) -> SparkSession:
3030
3131
3232def main (
33- dialect : str , command_type : commands .CommandType , ddl_concurrent_tasks : int , payload_path : str
33+ dialect : str ,
34+ default_catalog : str ,
35+ command_type : commands .CommandType ,
36+ ddl_concurrent_tasks : int ,
37+ payload_path : str ,
3438) -> None :
3539 if dialect not in ("databricks" , "spark" ):
3640 raise NotSupportedError (
@@ -50,6 +54,7 @@ def main(
5054 create_engine_adapter (
5155 lambda : spark_session_db .connection (spark ),
5256 dialect ,
57+ default_catalog = default_catalog ,
5358 multithreaded = ddl_concurrent_tasks > 1 ,
5459 execute_log_level = logging .INFO ,
5560 ),
@@ -79,6 +84,10 @@ def main(
7984 "--dialect" ,
8085 help = "The dialect to use when creating the engine adapter." ,
8186 )
87+ parser .add_argument (
88+ "--default_catalog" ,
89+ help = "The default catalog to use when creating the engine adapter." ,
90+ )
8291 parser .add_argument (
8392 "--command_type" ,
8493 type = commands .CommandType ,
@@ -96,4 +105,10 @@ def main(
96105 help = "Path to the payload object. Can be a local or remote path." ,
97106 )
98107 args = parser .parse_args ()
99- main (args .dialect , args .command_type , args .ddl_concurrent_tasks , args .payload_path )
108+ main (
109+ args .dialect ,
110+ args .default_catalog ,
111+ args .command_type ,
112+ args .ddl_concurrent_tasks ,
113+ args .payload_path ,
114+ )
0 commit comments