original_string: protected function createDbTableFromHeader($header)
      {
          if (empty($this->resource)) {
              $this->resource = 'import_' . time();
          }
          if (!$this->resourceExists('_schema/' . $this->resource)) {
              $schema = $this->createSchemaFromHeader($header);
              $this->createTable($schema);
  
              return true;
          } else {
              throw new BadRequestException(
                  'Importing CSV data into existing DB table [' . $this->resource . '] is not supported.'
              );
          }
      }
code: protected function createDbTableFromHeader($header)
      {
          if (empty($this->resource)) {
              $this->resource = 'import_' . time();
          }
          if (!$this->resourceExists('_schema/' . $this->resource)) {
              $schema = $this->createSchemaFromHeader($header);
              $this->createTable($schema);
  
              return true;
          } else {
              throw new BadRequestException(
                  'Importing CSV data into existing DB table [' . $this->resource . '] is not supported.'
              );
          }
      }
code_tokens: protected function createDbTableFromHeader ( $ header ) { if ( empty ( $ this -> resource ) ) { $ this -> resource = 'import_' . time ( ) ; } if ( ! $ this -> resourceExists ( '_schema/' . $ this -> resource ) ) { $ schema = $ this -> createSchemaFromHeader ( $ header ) ; $ this -> createTable ( $ schema ) ; return true ; } else { throw new BadRequestException ( 'Importing CSV data into existing DB table [' . $ this -> resource . '] is not supported.' ) ; } }
docstring: Creates DB table based on CSV header row
  
  @param $header
  
  @return bool
  @throws \DreamFactory\Core\Exceptions\BadRequestException
docstring_tokens: Creates DB table based on CSV header row