コード例 #1
0
ファイル: api.py プロジェクト: bbkchdhry/ksql-python
 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
ファイル: api.py プロジェクト: williamd1618/ksql-python
 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
ファイル: api.py プロジェクト: bbkchdhry/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,
     )
     self.ksql(ksql_string)
     return True
コード例 #4
0
ファイル: api.py プロジェクト: williamd1618/ksql-python
 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