<commit_before>Feature: [CROSSDATA-251]Create External tables(MONGODB)
  Background:
  Given Drop the spark tables

  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(Not exists Database)
    Given I drop a mongoDB database 'externaldatabase'
    #  When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '127.0.0.1:27017', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'

  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB table(Exists Database)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB database 'externaldatabase'
#  When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '127.0.0.1:27017', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'


  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(exists keyspace and exists table)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB collection 'externalcollection' over database 'externaldatabase'
    #  When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '127.0.0.1:27017', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS' thrown

  Scenario Outline: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(exists database)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB database 'externaldatabase'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name <type>) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '127.0.0.1:27017', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'
    Examples:
      | type                  |
      | INT                   |
      | LONG                  |
      | FLOAT                 |
      | DOUBLE                |
      | DECIMAL               |
      | STRING                |
      | BINARY                |
      | BOOLEAN               |
      | TIMESTAMP             |
      | ARRAY<STRING>         |
      | MAP<INT, INT>         |<commit_msg>[CROSSDATA-270][testAT]Fixed error in CreateMongoDBExternalTables.feature<commit_after>Feature: [CROSSDATA-251]Create External tables(MONGODB)
  Background:
  Given Drop the spark tables

  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(Not exists Database)
    Given I drop a mongoDB database 'externaldatabase'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'

  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB table(Exists Database)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB database 'externaldatabase'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'


  Scenario: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(exists keyspace and exists table)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB collection 'externalcollection' over database 'externaldatabase'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name STRING) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS' thrown

  Scenario Outline: [MONGODB EXTERNAL TABLE : CROSSDATA-270]Create a MongoDB collection(exists database)
    Given I drop a mongoDB database 'externaldatabase'
    Given I create a mongoDB database 'externaldatabase'
    When I execute 'CREATE EXTERNAL TABLE externaldatabase.externalcollection (id INT, name <type>) USING com.stratio.crossdata.connector.mongodb OPTIONS (host '${MONGO_HOST}:${MONGO_PORT}', database 'externaldatabase', collection 'externalcollection')'
    Then an exception 'IS NOT' thrown
    And The collection 'externalcollection' exists in mongo database 'externaldatabase'
    Examples:
      | type                  |
      | INT                   |
      | LONG                  |
      | FLOAT                 |
      | DOUBLE                |
      | DECIMAL               |
      | STRING                |
      | BINARY                |
      | BOOLEAN               |
      | TIMESTAMP             |
      | ARRAY<STRING>         |
      | MAP<INT, INT>         |
{'fraction_non_alphanumeric': 0.07939745802604739, 'fraction_numerical': 0.01208222187352895, 'mean_word_length': 3.6423889293517844, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '985733', 'n_tokens_mistral': 1791, 'n_tokens_neox': 1681, 'n_words': 557}