@@ -38,36 +38,6 @@ class SQLContext:
3838 The SQLContext is the main entry point for the Feldera SQL API.
3939 Abstracts the interaction with the Feldera API and provides a high-level interface for SQL pipelines.
4040 """
41- client : FelderaClient
42- pipeline_name : str
43- program_name : str
44- build_mode : BuildMode
45- state : PipelineState = PipelineState .SHUTDOWN
46-
47- pipeline_description : str = ""
48- program_description : str = ""
49- ddl : str = ""
50-
51- # In the SQL DDL declaration, the order of the tables and views is important.
52- # From python 3.7 onwards, the order of insertion is preserved in dictionaries.
53- # https://softwaremaniacs.org/blog/2020/02/05/dicts-ordered/en/
54- views : Dict [str , str ] = {}
55- tables : Dict [str , SQLTable ] = {}
56-
57- # TODO: to be used for schema inference
58- todo_tables : Dict [str , Optional [SQLTable ]] = {}
59-
60- http_input_buffer : list [Dict [str , dict | list [dict ] | str ]] = []
61-
62- # buffer that stores all input connectors to be created
63- # this is a Mapping[table_name -> list[Connector]]
64- input_connectors_buffer : Dict [str , list [Connector ]] = {}
65-
66- # buffer that stores all output connectors to be created
67- # this is a Mapping[view_name -> list[Connector]]
68- output_connectors_buffer : Dict [str , list [Connector ]] = {}
69-
70- views_tx : list [Dict [str , Queue ]] = []
7141
7242 def __init__ (
7343 self ,
@@ -77,13 +47,39 @@ def __init__(
7747 program_name : str = None ,
7848 program_description : str = None ,
7949 ):
80- self .client = client
50+ self .build_mode : Optional [BuildMode ] = None
51+ self .state : PipelineState = PipelineState .SHUTDOWN
52+
53+ self .ddl : str = ""
54+
55+ # In the SQL DDL declaration, the order of the tables and views is important.
56+ # From python 3.7 onwards, the order of insertion is preserved in dictionaries.
57+ # https://softwaremaniacs.org/blog/2020/02/05/dicts-ordered/en/
58+ self .views : Dict [str , str ] = {}
59+ self .tables : Dict [str , SQLTable ] = {}
60+
61+ # TODO: to be used for schema inference
62+ self .todo_tables : Dict [str , Optional [SQLTable ]] = {}
63+
64+ self .http_input_buffer : list [Dict [str , dict | list [dict ] | str ]] = []
65+
66+ # buffer that stores all input connectors to be created
67+ # this is a Mapping[table_name -> list[Connector]]
68+ self .input_connectors_buffer : Dict [str , list [Connector ]] = {}
69+
70+ # buffer that stores all output connectors to be created
71+ # this is a Mapping[view_name -> list[Connector]]
72+ self .output_connectors_buffer : Dict [str , list [Connector ]] = {}
73+
74+ self .views_tx : list [Dict [str , Queue ]] = []
75+
76+ self .client : FelderaClient = client
8177
82- self .pipeline_name = pipeline_name
83- self .pipeline_description = pipeline_description or ""
78+ self .pipeline_name : str = pipeline_name
79+ self .pipeline_description : str = pipeline_description or ""
8480
85- self .program_name = program_name or pipeline_name
86- self .program_description = program_description or ""
81+ self .program_name : str = program_name or pipeline_name
82+ self .program_description : str = program_description or ""
8783
8884 def __build_ddl (self ):
8985 """
0 commit comments