예제 #1
0
 def _create_as(
     self,
     table_type,
     table_name,
     select_columns,
     src_table,
     kafka_topic=None,
     value_format="JSON",
     conditions=[],
     partition_by=None,
     **kwargs
 ):
     ksql_string = SQLBuilder.build(
         sql_type="create_as",
         table_type=table_type,
         table_name=table_name,
         select_columns=select_columns,
         src_table=src_table,
         kafka_topic=kafka_topic,
         value_format=value_format,
         conditions=conditions,
         partition_by=partition_by,
         **kwargs,
     )
     self.ksql(ksql_string)
     return True
예제 #2
0
 def _create(self, table_type, table_name, columns_type, topic, value_format):
     ksql_string = SQLBuilder.build(sql_type = 'create', 
                                   table_type = table_type, 
                                   table_name = table_name, 
                                   columns_type = columns_type, 
                                   topic = topic, 
                                   value_format = value_format)
     r = self.ksql(ksql_string)
     return self._parse_ksql_res(r, CreateError)
예제 #3
0
 def _create(self, table_type, table_name, columns_type, topic, value_format="JSON", key=None):
     ksql_string = SQLBuilder.build(
         sql_type="create",
         table_type=table_type,
         table_name=table_name,
         columns_type=columns_type,
         topic=topic,
         value_format=value_format,
         key=key,
     )
     self.ksql(ksql_string)
     return True
예제 #4
0
 def _create_as(self, table_type, table_name, select_columns, src_table, kafka_topic=None, 
                value_format='DELIMITED', conditions=[], partition_by=None, **kwargs):
     ksql_string = SQLBuilder.build(sql_type='create_as',
                                    table_type=table_type,
                                    table_name=table_name,
                                    select_columns=select_columns,
                                    src_table=src_table,
                                    kafka_topic=kafka_topic,
                                    value_format=value_format,
                                    conditions=conditions,
                                    partition_by=partition_by,
                                    **kwargs)
     r = self.ksql(ksql_string)
     return self._parse_ksql_res(r, CreateError)
예제 #5
0
파일: api.py 프로젝트: olmul/ksql-python
 def _create(self,
             table_type,
             table_name,
             columns_type,
             topic,
             value_format='JSON',
             key=None):
     ksql_string = SQLBuilder.build(sql_type='create',
                                    table_type=table_type,
                                    table_name=table_name,
                                    columns_type=columns_type,
                                    topic=topic,
                                    value_format=value_format,
                                    key=key)
     r = self.ksql(ksql_string)
     return True