def create_table(self, impala_name, kudu_name, primary_keys=None,
                     obj=None, schema=None, database=None,
                     external=False, force=False):
        self._check_connected()

        if not external and (primary_keys is None or len(primary_keys) == 0):
            raise ValueError('Must specify primary keys when DDL creates a '
                             'new Kudu table')

        if obj is not None:
            if external:
                raise ValueError('Cannot create an external Kudu-Impala table '
                                 'from an expression or DataFrame')

            if isinstance(obj, pd.DataFrame):
                from ibis.impala.pandas_interop import write_temp_dataframe
                writer, to_insert = write_temp_dataframe(self.impala_client,
                                                         obj)
            else:
                to_insert = obj
            # XXX: exposing a lot of internals
            ast = self.impala_client._build_ast(to_insert)
            select = ast.queries[0]

            stmt = CTASKudu(impala_name, kudu_name,
                            self.client.master_addrs,
                            select, primary_keys,
                            database=database)
        else:
            if external:
                ktable = self.client.table(kudu_name)
                kschema = ktable.schema
                schema = schema_kudu_to_ibis(kschema)
                primary_keys = kschema.primary_keys()
            elif schema is None:
                raise ValueError('Must specify schema for new empty '
                                 'Kudu-backed table')

            stmt = CreateTableKudu(impala_name, kudu_name,
                                   self.client.master_addrs,
                                   schema, primary_keys,
                                   external=external,
                                   database=database,
                                   can_exist=False)

        self.impala_client._execute(stmt)
Create an Kudu-backed table in the connected Impala cluster. For
dataset/ETHPy150Open cloudera/ibis/ibis/impala/kudu_support.py/KuduImpalaInterface.create_table