diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 1dd9f34012e9..3975c20aa834 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -295,7 +295,7 @@ - name: Faker sourceDefinitionId: dfd88b22-b603-4c3d-aad7-3701784586b1 dockerRepository: airbyte/source-faker - dockerImageTag: 0.1.8 + dockerImageTag: 0.2.0 documentationUrl: https://docs.airbyte.com/integrations/sources/faker sourceType: api releaseStage: alpha diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 1040a76999e0..e027db5e0214 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -2948,7 +2948,7 @@ oauthFlowInitParameters: [] oauthFlowOutputParameters: - - "access_token" -- dockerImage: "airbyte/source-faker:0.1.8" +- dockerImage: "airbyte/source-faker:0.2.0" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/faker" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-faker/Dockerfile b/airbyte-integrations/connectors/source-faker/Dockerfile index 8691ac121aa0..86f7f29a80a0 100644 --- a/airbyte-integrations/connectors/source-faker/Dockerfile +++ b/airbyte-integrations/connectors/source-faker/Dockerfile @@ -34,5 +34,5 @@ COPY source_faker ./source_faker ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.8 +LABEL io.airbyte.version=0.2.0 LABEL io.airbyte.name=airbyte/source-faker diff --git a/airbyte-integrations/connectors/source-faker/README.md b/airbyte-integrations/connectors/source-faker/README.md index 544140802cd2..4773805d8b82 100644 --- a/airbyte-integrations/connectors/source-faker/README.md +++ b/airbyte-integrations/connectors/source-faker/README.md @@ -97,7 +97,7 @@ Make sure to familiarize yourself with [pytest test discovery](https://docs.pyte First install test dependencies into your virtual environment: ``` -pip install .[tests] +pip install ".[tests]" ``` ### Unit Tests diff --git a/airbyte-integrations/connectors/source-faker/integration_tests/catalog.json b/airbyte-integrations/connectors/source-faker/integration_tests/catalog.json index 5ebcdfb9c62f..6530001f43d6 100644 --- a/airbyte-integrations/connectors/source-faker/integration_tests/catalog.json +++ b/airbyte-integrations/connectors/source-faker/integration_tests/catalog.json @@ -10,25 +10,26 @@ "created_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, "updated_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, - "job": { "type": "string" }, - "company": { "type": "string" }, - "ssn": { "type": "string" }, - "residence": { "type": "string" }, - "current_location": { "type": "array" }, - "blood_group": { "type": "string" }, - "website": { "type": "array" }, - "username": { "type": "string" }, "name": { "type": "string" }, - "sex": { "type": "string" }, - "address": { "type": "string" }, - "mail": { "type": "string" } + "title": { "type": "string" }, + "age": { "type": "integer" }, + "email": { "type": "string" }, + "telephone": { "type": "string" }, + "gender": { "type": "string" }, + "language": { "type": "string" }, + "academic_degree": { "type": "string" }, + "nationality": { "type": "string" }, + "occupation": { "type": "string" }, + "height": { "type": "string" }, + "blood_type": { "type": "string" }, + "weight": { "type": "integer" } } }, "supported_sync_modes": ["incremental", "full_refresh"], diff --git a/airbyte-integrations/connectors/source-faker/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-faker/integration_tests/configured_catalog.json index d089cabcd4b1..1e4be19ffda7 100644 --- a/airbyte-integrations/connectors/source-faker/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-faker/integration_tests/configured_catalog.json @@ -8,20 +8,29 @@ "type": "object", "properties": { "id": { "type": "number" }, - "created_at": { "type": "date" }, - "updated_at": { "type": "date" }, - "job": { "type": "string" }, - "company": { "type": "string" }, - "ssn": { "type": "string" }, - "residence": { "type": "string" }, - "current_location": { "type": "array" }, - "blood_group": { "type": "string" }, - "website": { "type": "array" }, - "username": { "type": "string" }, + "created_at": { + "type": "string", + "format": "date-time", + "airbyte_type": "timestamp_with_timezone" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "airbyte_type": "timestamp_with_timezone" + }, "name": { "type": "string" }, - "sex": { "type": "string" }, - "address": { "type": "string" }, - "mail": { "type": "string" } + "title": { "type": "string" }, + "age": { "type": "integer" }, + "email": { "type": "string" }, + "telephone": { "type": "string" }, + "gender": { "type": "string" }, + "language": { "type": "string" }, + "academic_degree": { "type": "string" }, + "nationality": { "type": "string" }, + "occupation": { "type": "string" }, + "height": { "type": "string" }, + "blood_type": { "type": "string" }, + "weight": { "type": "integer" } } }, "supported_sync_modes": ["incremental", "full_refresh"], diff --git a/airbyte-integrations/connectors/source-faker/integration_tests/expected_records.txt b/airbyte-integrations/connectors/source-faker/integration_tests/expected_records.txt index 185bd299ad99..aecffc24112e 100644 --- a/airbyte-integrations/connectors/source-faker/integration_tests/expected_records.txt +++ b/airbyte-integrations/connectors/source-faker/integration_tests/expected_records.txt @@ -1,10 +1,10 @@ -{"stream": "Users", "data": {"job": "Musician", "company": "Williams-Sheppard", "ssn": "498-52-4970", "residence": "Unit 5938 Box 2421\nDPO AP 33335", "current_location": [52.958961, 143.143712], "blood_group": "B+", "website": ["http://www.rivera.com/", "http://grimes-green.net/", "http://www.larsen.com/"], "username": "leeashley", "name": "Gary Cross", "sex": "M", "address": "711 Golden Overpass\nWest Andreaville, MA 71317", "mail": "tamaramorrison@hotmail.com", "id": 1, "created_at": "1976-03-27T12:40:22", "updated_at": "2000-04-13T06:17:38"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Therapist, occupational", "company": "Stewart-Allen", "ssn": "189-25-3060", "residence": "1122 Megan Squares Suite 848\nPort Jason, OR 55475", "current_location": [65.610695, -32.24732], "blood_group": "O-", "website": ["https://www.salazar-tucker.com/", "http://www.dennis.com/", "https://www.simmons-brown.com/", "http://www.walters.com/"], "username": "myersmitchell", "name": "Chelsea Greer", "sex": "F", "address": "Unit 0903 Box 2173\nDPO AP 08507", "mail": "stephenschristine@yahoo.com", "id": 2, "created_at": "1974-11-24T20:47:03", "updated_at": "1985-01-10T17:47:40"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Illustrator", "company": "Graham-Brown", "ssn": "479-06-9773", "residence": "45792 Tammy Centers Apt. 258\nDavidmouth, HI 02231", "current_location": [36.600983, 40.066283], "blood_group": "AB+", "website": ["https://castro.info/", "http://williams.info/", "https://howard.org/"], "username": "smithjames", "name": "Jasmine Perry", "sex": "F", "address": "76960 Savage Port\nBartonton, NV 08874", "mail": "jacqueline78@yahoo.com", "id": 3, "created_at": "2011-02-06T22:32:40", "updated_at": "2021-05-30T16:13:19"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Academic librarian", "company": "Simpson LLC", "ssn": "858-60-0817", "residence": "81206 Stewart Forest Apt. 089\nEast Davidborough, ME 37198", "current_location": [-41.0853825, -126.215901], "blood_group": "O-", "website": ["http://www.sloan-marsh.com/", "https://www.meyer.com/", "https://www.williams.com/", "https://browning.org/"], "username": "monica23", "name": "Steven Bowman", "sex": "M", "address": "22455 Higgins Junction Apt. 042\nNew Keith, OH 17493", "mail": "danny30@yahoo.com", "id": 4, "created_at": "2005-08-05T11:36:52", "updated_at": "2019-08-02T23:04:14"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Building services engineer", "company": "Powell-Murphy", "ssn": "425-14-1629", "residence": "5517 Holly Meadow Apt. 452\nLake Anne, SC 11894", "current_location": [-72.327639, -134.543372], "blood_group": "B-", "website": ["http://garcia.net/", "https://kramer-klein.com/"], "username": "ryanhoward", "name": "Daniel Duarte", "sex": "M", "address": "731 Sanders Fords\nPort Jasonberg, ID 60585", "mail": "jward@gmail.com", "id": 5, "created_at": "1980-02-06T13:15:11", "updated_at": "2003-03-15T20:31:32"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Surveyor, rural practice", "company": "Little-Henderson", "ssn": "534-64-5284", "residence": "389 Alec Squares Suite 508\nPort Jonathan, FL 50177", "current_location": [66.4839605, -21.954682], "blood_group": "O-", "website": ["http://www.perez.com/"], "username": "mistymurray", "name": "Joan Atkins", "sex": "F", "address": "809 Erika Valley Apt. 634\nPetersenfort, WY 51431", "mail": "melissayates@hotmail.com", "id": 6, "created_at": "1982-05-20T20:41:25", "updated_at": "2020-05-29T07:50:41"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Immigration officer", "company": "Hudson, Cook and Snyder", "ssn": "269-39-6686", "residence": "22345 Sheri Orchard Suite 279\nLake Hollystad, AZ 80687", "current_location": [35.165804, 27.598858], "blood_group": "O-", "website": ["http://smith.org/"], "username": "james71", "name": "Ashley Dunn", "sex": "F", "address": "519 Kramer Crossroad Suite 418\nNorth Kimberly, MN 99672", "mail": "stanleyclarke@gmail.com", "id": 7, "created_at": "1972-09-20T17:24:07", "updated_at": "2003-01-31T16:46:49"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Freight forwarder", "company": "Duffy Ltd", "ssn": "583-74-3539", "residence": "412 Snow Manors Apt. 161\nSouth Kimtown, NV 57004", "current_location": [21.942823, -163.821807], "blood_group": "O-", "website": ["https://www.jones-howard.com/", "https://smith.com/", "http://www.smith.com/"], "username": "michelelopez", "name": "Melissa Cantu", "sex": "F", "address": "420 Michael Mountains Suite 485\nNew Victoria, ND 76634", "mail": "eric22@gmail.com", "id": 8, "created_at": "1986-07-11T18:55:27", "updated_at": "2004-08-04T16:06:58"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Fast food restaurant manager", "company": "Carter Group", "ssn": "680-06-2167", "residence": "12648 Yang Divide Suite 451\nSouth Cynthia, NC 08084", "current_location": [11.047629, 39.379532], "blood_group": "A+", "website": ["https://watson.com/", "http://www.rodriguez-jacobs.com/", "https://saunders.com/", "http://giles-thomas.info/"], "username": "amontgomery", "name": "Christina Smith", "sex": "F", "address": "489 Roger Terrace\nDavisfort, IN 71770", "mail": "bramirez@gmail.com", "id": 9, "created_at": "1972-10-04T19:18:09", "updated_at": "2015-06-29T09:01:24"}, "emitted_at": 1649892395000} -{"stream": "Users", "data": {"job": "Academic librarian", "company": "Ross-Zamora", "ssn": "728-51-7285", "residence": "4391 Chad Greens Suite 851\nPort Frank, LA 37561", "current_location": [49.5419055, -107.833532], "blood_group": "B-", "website": ["https://osborne.com/"], "username": "qtaylor", "name": "Melissa James", "sex": "F", "address": "637 Neal Island Suite 074\nLake Tyler, RI 28775", "mail": "kellypeter@gmail.com", "id": 10, "created_at": "1974-07-10T19:02:25", "updated_at": "2005-11-07T09:09:06"}, "emitted_at": 1649892395000} +{"stream": "Users", "data": {"id": 1, "name": "Reda", "title": "M.Sc.Tech.", "age": 47, "email": "locations1983@protonmail.com", "telephone": "+1-(110)-795-7610", "gender": "Male", "language": "Tamil", "academic_degree": "Master", "nationality": "Italian", "occupation": "Word Processing Operator", "height": "1.55", "blood_type": "B\u2212", "weight": 58, "created_at": "2009-08-12T18:57:58+00:00", "updated_at": "2012-07-02T08:32:31+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 2, "name": "Tristan", "title": "M.Sc.Tech.", "age": 32, "email": "variations1847@duck.com", "telephone": "683-770-9281", "gender": "Other", "language": "Bosnian", "academic_degree": "Bachelor", "nationality": "Estonian", "occupation": "Tiler", "height": "2.00", "blood_type": "AB\u2212", "weight": 44, "created_at": "2008-09-23T19:57:09+00:00", "updated_at": "2016-03-10T04:48:06+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 3, "name": "Yuki", "title": "Miss", "age": 50, "email": "vacuum2027@yahoo.com", "telephone": "1-321-809-2061", "gender": "Female", "language": "Armenian", "academic_degree": "Bachelor", "nationality": "Swiss", "occupation": "Valuer", "height": "1.84", "blood_type": "O\u2212", "weight": 71, "created_at": "2003-06-14T10:39:40+00:00", "updated_at": "2003-12-03T21:21:30+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 4, "name": "Fred", "title": "MMath", "age": 47, "email": "causes1859@outlook.com", "telephone": "(827) 127-3811", "gender": "Female", "language": "Assamese", "academic_degree": "PhD", "nationality": "Russian", "occupation": "Turkey Farmer", "height": "1.80", "blood_type": "A+", "weight": 39, "created_at": "2001-09-30T00:05:46+00:00", "updated_at": "2006-09-16T14:55:33+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 5, "name": "Emmitt", "title": "DPhil", "age": 39, "email": "athens1899@gmail.com", "telephone": "(470) 656-8003", "gender": "Other", "language": "English", "academic_degree": "Bachelor", "nationality": "Jordanian", "occupation": "Stone Sawyer", "height": "1.52", "blood_type": "A+", "weight": 82, "created_at": "2012-12-27T21:40:00+00:00", "updated_at": "2015-06-08T23:20:45+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 6, "name": "Hollis", "title": "MSc", "age": 52, "email": "fisheries1881@yandex.com", "telephone": "(519) 606-9896", "gender": "Other", "language": "Swati", "academic_degree": "Master", "nationality": "Chilean", "occupation": "Writer", "height": "1.85", "blood_type": "AB\u2212", "weight": 85, "created_at": "2002-04-30T18:14:15+00:00", "updated_at": "2004-09-15T02:05:20+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 7, "name": "Kip", "title": "M.D.", "age": 31, "email": "numbers1983@example.com", "telephone": "346-013-2638", "gender": "Other", "language": "Armenian", "academic_degree": "Master", "nationality": "Swiss", "occupation": "Salesman", "height": "1.89", "blood_type": "O+", "weight": 48, "created_at": "2003-09-11T17:13:51+00:00", "updated_at": "2016-08-04T09:35:18+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 8, "name": "Carie", "title": "Madam", "age": 49, "email": "watershed1819@example.com", "telephone": "(348) 881-9607", "gender": "Male", "language": "Kyrgyz", "academic_degree": "PhD", "nationality": "Guatemalan", "occupation": "Park Ranger", "height": "1.50", "blood_type": "O+", "weight": 83, "created_at": "2012-06-19T07:18:11+00:00", "updated_at": "2017-10-10T14:05:38+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 9, "name": "Steven", "title": "Mr.", "age": 54, "email": "llp1893@yahoo.com", "telephone": "830.247.8156", "gender": "Fluid", "language": "Catalan", "academic_degree": "Bachelor", "nationality": "Egyptian", "occupation": "Ambulance Driver", "height": "1.52", "blood_type": "AB+", "weight": 81, "created_at": "2002-11-25T04:56:09+00:00", "updated_at": "2005-01-20T21:16:30+00:00"}, "emitted_at": 1665791425000} +{"stream": "Users", "data": {"id": 10, "name": "Lore", "title": "Madam", "age": 61, "email": "resident2075@example.com", "telephone": "321.233.0702", "gender": "Female", "language": "Polish", "academic_degree": "Master", "nationality": "French", "occupation": "Registrar", "height": "1.99", "blood_type": "B+", "weight": 56, "created_at": "2001-02-23T17:43:25+00:00", "updated_at": "2022-09-09T16:51:15+00:00"}, "emitted_at": 1665791425000} diff --git a/airbyte-integrations/connectors/source-faker/setup.py b/airbyte-integrations/connectors/source-faker/setup.py index 7bb17317d8b5..ab62499037f5 100644 --- a/airbyte-integrations/connectors/source-faker/setup.py +++ b/airbyte-integrations/connectors/source-faker/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup -MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "Faker==13.3.1"] +MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "mimesis==6.1.1"] TEST_REQUIREMENTS = [ "pytest~=6.1", @@ -14,7 +14,7 @@ setup( name="source_faker", - description="Source implementation for Faker.", + description="Source implementation for fake but realistic looking data.", author="Airbyte", author_email="evan@airbyte.io", packages=find_packages(), diff --git a/airbyte-integrations/connectors/source-faker/source_faker/products.json b/airbyte-integrations/connectors/source-faker/source_faker/products.json index 2381a1a3d9b2..3969d502111a 100644 --- a/airbyte-integrations/connectors/source-faker/source_faker/products.json +++ b/airbyte-integrations/connectors/source-faker/source_faker/products.json @@ -5,7 +5,7 @@ "model": "MX-5", "year": 2008, "price": 2869, - "created_at": "2022-02-01T17:02:19Z" + "created_at": "2022-02-01T17:02:19+00:00" }, { "id": 2, @@ -13,7 +13,7 @@ "model": "C-Class", "year": 2009, "price": 42397, - "created_at": "2021-01-25T14:31:33" + "created_at": "2021-01-25T14:31:33+00:00" }, { "id": 3, @@ -21,7 +21,7 @@ "model": "Accord Crosstour", "year": 2011, "price": 63293, - "created_at": "2021-02-11T05:36:03Z" + "created_at": "2021-02-11T05:36:03+00:00" }, { "id": 4, @@ -29,7 +29,7 @@ "model": "Jimmy", "year": 1998, "price": 34079, - "created_at": "2022-01-24T03:00:03Z" + "created_at": "2022-01-24T03:00:03+00:00" }, { "id": 5, @@ -37,7 +37,7 @@ "model": "FX", "year": 2004, "price": 17036, - "created_at": "2021-10-02T03:55:44Z" + "created_at": "2021-10-02T03:55:44+00:00" }, { "id": 6, @@ -45,7 +45,7 @@ "model": "Intrepid", "year": 2002, "price": 65498, - "created_at": "2022-01-18T00:41:08Z" + "created_at": "2022-01-18T00:41:08+00:00" }, { "id": 7, @@ -53,7 +53,7 @@ "model": "Frontier", "year": 2005, "price": 14516, - "created_at": "2021-04-22T16:37:44Z" + "created_at": "2021-04-22T16:37:44+00:00" }, { "id": 8, @@ -61,7 +61,7 @@ "model": "Express 1500", "year": 2007, "price": 13023, - "created_at": "2021-07-12T07:13:04Z" + "created_at": "2021-07-12T07:13:04+00:00" }, { "id": 9, @@ -69,7 +69,7 @@ "model": "Continental GTC", "year": 2008, "price": 43458, - "created_at": "2021-03-17T05:43:15Z" + "created_at": "2021-03-17T05:43:15+00:00" }, { "id": 10, @@ -77,7 +77,7 @@ "model": "DTS", "year": 2008, "price": 43859, - "created_at": "2021-08-12T07:33:58Z" + "created_at": "2021-08-12T07:33:58+00:00" }, { "id": 11, @@ -85,7 +85,7 @@ "model": "Ram 2500", "year": 2000, "price": 82904, - "created_at": "2021-09-03T10:51:16Z" + "created_at": "2021-09-03T10:51:16+00:00" }, { "id": 12, @@ -93,7 +93,7 @@ "model": "SJ 410", "year": 1984, "price": 38667, - "created_at": "2021-01-11T00:15:46Z" + "created_at": "2021-01-11T00:15:46+00:00" }, { "id": 13, @@ -101,7 +101,7 @@ "model": "S4", "year": 2005, "price": 2391, - "created_at": "2021-09-06T03:31:10Z" + "created_at": "2021-09-06T03:31:10+00:00" }, { "id": 14, @@ -109,7 +109,7 @@ "model": "Suburban 2500", "year": 1998, "price": 55733, - "created_at": "2021-10-18T17:26:05Z" + "created_at": "2021-10-18T17:26:05+00:00" }, { "id": 15, @@ -117,7 +117,7 @@ "model": "Ranger", "year": 2000, "price": 20228, - "created_at": "2022-03-24T04:03:19Z" + "created_at": "2022-03-24T04:03:19+00:00" }, { "id": 16, @@ -125,7 +125,7 @@ "model": "Corvette", "year": 2009, "price": 75052, - "created_at": "2021-12-31T03:38:21Z" + "created_at": "2021-12-31T03:38:21+00:00" }, { "id": 17, @@ -133,7 +133,7 @@ "model": "Pajero", "year": 1993, "price": 84058, - "created_at": "2021-10-15T00:25:34Z" + "created_at": "2021-10-15T00:25:34+00:00" }, { "id": 18, @@ -141,7 +141,7 @@ "model": "LS", "year": 2002, "price": 34081, - "created_at": "2022-02-14T22:12:01Z" + "created_at": "2022-02-14T22:12:01+00:00" }, { "id": 19, @@ -149,7 +149,7 @@ "model": "Magnum", "year": 2005, "price": 85545, - "created_at": "2021-07-25T22:49:48Z" + "created_at": "2021-07-25T22:49:48+00:00" }, { "id": 20, @@ -157,7 +157,7 @@ "model": "Grand Am", "year": 2001, "price": 54837, - "created_at": "2021-10-15T14:08:30Z" + "created_at": "2021-10-15T14:08:30+00:00" }, { "id": 21, @@ -165,7 +165,7 @@ "model": "Suburban 1500", "year": 2006, "price": 89410, - "created_at": "2021-03-23T15:40:43Z" + "created_at": "2021-03-23T15:40:43+00:00" }, { "id": 22, @@ -173,7 +173,7 @@ "model": "Sierra 1500", "year": 2005, "price": 14288, - "created_at": "2021-08-30T13:40:04Z" + "created_at": "2021-08-30T13:40:04+00:00" }, { "id": 23, @@ -181,7 +181,7 @@ "model": "3500", "year": 1995, "price": 12011, - "created_at": "2022-04-24T13:11:08Z" + "created_at": "2022-04-24T13:11:08+00:00" }, { "id": 24, @@ -189,7 +189,7 @@ "model": "Mazda5", "year": 2006, "price": 6393, - "created_at": "2021-07-07T14:14:33Z" + "created_at": "2021-07-07T14:14:33+00:00" }, { "id": 25, @@ -197,7 +197,7 @@ "model": "Camaro", "year": 1967, "price": 71590, - "created_at": "2021-01-10T21:50:22Z" + "created_at": "2021-01-10T21:50:22+00:00" }, { "id": 26, @@ -205,7 +205,7 @@ "model": "Explorer Sport Trac", "year": 2010, "price": 23498, - "created_at": "2022-04-20T00:52:20Z" + "created_at": "2022-04-20T00:52:20+00:00" }, { "id": 27, @@ -213,7 +213,7 @@ "model": "Caravan", "year": 1985, "price": 50071, - "created_at": "2022-01-05T10:13:31Z" + "created_at": "2022-01-05T10:13:31+00:00" }, { "id": 28, @@ -221,7 +221,7 @@ "model": "240SX", "year": 1992, "price": 38379, - "created_at": "2022-04-07T04:48:48Z" + "created_at": "2022-04-07T04:48:48+00:00" }, { "id": 29, @@ -229,7 +229,7 @@ "model": "Intrigue", "year": 2002, "price": 21376, - "created_at": "2021-10-01T13:30:49Z" + "created_at": "2021-10-01T13:30:49+00:00" }, { "id": 30, @@ -237,7 +237,7 @@ "model": "TT", "year": 2011, "price": 40893, - "created_at": "2021-02-28T23:06:37Z" + "created_at": "2021-02-28T23:06:37+00:00" }, { "id": 31, @@ -245,7 +245,7 @@ "model": "Crown Victoria", "year": 2006, "price": 86225, - "created_at": "2021-01-28T23:33:27Z" + "created_at": "2021-01-28T23:33:27+00:00" }, { "id": 32, @@ -253,7 +253,7 @@ "model": "Tacoma", "year": 2003, "price": 73558, - "created_at": "2022-01-28T22:02:04Z" + "created_at": "2022-01-28T22:02:04+00:00" }, { "id": 33, @@ -261,7 +261,7 @@ "model": "Regal", "year": 1994, "price": 32279, - "created_at": "2022-04-04T13:35:49Z" + "created_at": "2022-04-04T13:35:49+00:00" }, { "id": 34, @@ -269,7 +269,7 @@ "model": "C-Class", "year": 2001, "price": 98732, - "created_at": "2021-03-30T23:16:05Z" + "created_at": "2021-03-30T23:16:05+00:00" }, { "id": 35, @@ -277,7 +277,7 @@ "model": "Sierra 3500", "year": 2002, "price": 48267, - "created_at": "2021-07-30T20:29:51Z" + "created_at": "2021-07-30T20:29:51+00:00" }, { "id": 36, @@ -285,7 +285,7 @@ "model": "G6", "year": 2005, "price": 16766, - "created_at": "2021-03-24T07:53:33Z" + "created_at": "2021-03-24T07:53:33+00:00" }, { "id": 37, @@ -293,7 +293,7 @@ "model": "Outback Sport", "year": 2002, "price": 34523, - "created_at": "2021-12-23T22:47:32Z" + "created_at": "2021-12-23T22:47:32+00:00" }, { "id": 38, @@ -301,7 +301,7 @@ "model": "F430", "year": 2007, "price": 31677, - "created_at": "2021-01-11T04:49:57Z" + "created_at": "2021-01-11T04:49:57+00:00" }, { "id": 39, @@ -309,7 +309,7 @@ "model": "Montero", "year": 2003, "price": 67136, - "created_at": "2021-05-10T07:37:56Z" + "created_at": "2021-05-10T07:37:56+00:00" }, { "id": 40, @@ -317,7 +317,7 @@ "model": "Sentra", "year": 1993, "price": 78236, - "created_at": "2021-11-10T23:48:26Z" + "created_at": "2021-11-10T23:48:26+00:00" }, { "id": 41, @@ -325,7 +325,7 @@ "model": "3000GT", "year": 1993, "price": 58150, - "created_at": "2021-09-08T06:55:22Z" + "created_at": "2021-09-08T06:55:22+00:00" }, { "id": 42, @@ -333,7 +333,7 @@ "model": "E350", "year": 2012, "price": 55270, - "created_at": "2021-03-24T13:17:37Z" + "created_at": "2021-03-24T13:17:37+00:00" }, { "id": 43, @@ -341,7 +341,7 @@ "model": "Taurus", "year": 1987, "price": 13522, - "created_at": "2021-10-27T21:03:59Z" + "created_at": "2021-10-27T21:03:59+00:00" }, { "id": 44, @@ -349,7 +349,7 @@ "model": "Avalanche", "year": 2012, "price": 9862, - "created_at": "2021-07-13T12:22:26Z" + "created_at": "2021-07-13T12:22:26+00:00" }, { "id": 45, @@ -357,7 +357,7 @@ "model": "Charger", "year": 2012, "price": 81887, - "created_at": "2021-04-24T01:48:24Z" + "created_at": "2021-04-24T01:48:24+00:00" }, { "id": 46, @@ -365,7 +365,7 @@ "model": "S-Type", "year": 2005, "price": 34372, - "created_at": "2021-04-03T08:56:17Z" + "created_at": "2021-04-03T08:56:17+00:00" }, { "id": 47, @@ -373,7 +373,7 @@ "model": "Grand Voyager", "year": 1994, "price": 90637, - "created_at": "2022-04-21T09:21:08Z" + "created_at": "2022-04-21T09:21:08+00:00" }, { "id": 48, @@ -381,7 +381,7 @@ "model": "6000", "year": 1989, "price": 65165, - "created_at": "2021-10-30T13:03:07Z" + "created_at": "2021-10-30T13:03:07+00:00" }, { "id": 49, @@ -389,7 +389,7 @@ "model": "IS", "year": 2006, "price": 22434, - "created_at": "2021-01-16T10:45:52Z" + "created_at": "2021-01-16T10:45:52+00:00" }, { "id": 50, @@ -397,7 +397,7 @@ "model": "VehiCROSS", "year": 2001, "price": 38180, - "created_at": "2021-12-13T16:29:27Z" + "created_at": "2021-12-13T16:29:27+00:00" }, { "id": 51, @@ -405,7 +405,7 @@ "model": "Regal", "year": 2000, "price": 38680, - "created_at": "2021-12-29T22:25:54Z" + "created_at": "2021-12-29T22:25:54+00:00" }, { "id": 52, @@ -413,7 +413,7 @@ "model": "E-Class", "year": 2007, "price": 51556, - "created_at": "2021-07-06T11:42:23Z" + "created_at": "2021-07-06T11:42:23+00:00" }, { "id": 53, @@ -421,7 +421,7 @@ "model": "LeSabre", "year": 2001, "price": 10904, - "created_at": "2022-01-05T18:23:35Z" + "created_at": "2022-01-05T18:23:35+00:00" }, { "id": 54, @@ -429,7 +429,7 @@ "model": "928", "year": 1989, "price": 70917, - "created_at": "2022-01-02T23:16:45Z" + "created_at": "2022-01-02T23:16:45+00:00" }, { "id": 55, @@ -437,7 +437,7 @@ "model": "RX", "year": 2007, "price": 5212, - "created_at": "2021-07-10T15:02:53Z" + "created_at": "2021-07-10T15:02:53+00:00" }, { "id": 56, @@ -445,7 +445,7 @@ "model": "Econoline E250", "year": 1996, "price": 75095, - "created_at": "2021-02-04T16:17:18Z" + "created_at": "2021-02-04T16:17:18+00:00" }, { "id": 57, @@ -453,7 +453,7 @@ "model": "Blazer", "year": 2001, "price": 61918, - "created_at": "2021-12-08T07:25:30Z" + "created_at": "2021-12-08T07:25:30+00:00" }, { "id": 58, @@ -461,7 +461,7 @@ "model": "Savana 3500", "year": 2003, "price": 30307, - "created_at": "2021-11-21T23:11:45Z" + "created_at": "2021-11-21T23:11:45+00:00" }, { "id": 59, @@ -469,7 +469,7 @@ "model": "M", "year": 2002, "price": 24598, - "created_at": "2021-05-28T04:08:53Z" + "created_at": "2021-05-28T04:08:53+00:00" }, { "id": 60, @@ -477,7 +477,7 @@ "model": "S-Series", "year": 1992, "price": 96288, - "created_at": "2021-08-24T04:43:43Z" + "created_at": "2021-08-24T04:43:43+00:00" }, { "id": 61, @@ -485,7 +485,7 @@ "model": "Sebring", "year": 2003, "price": 34753, - "created_at": "2021-02-11T11:25:35Z" + "created_at": "2021-02-11T11:25:35+00:00" }, { "id": 62, @@ -493,7 +493,7 @@ "model": "Evora", "year": 2010, "price": 42760, - "created_at": "2021-08-31T00:29:05Z" + "created_at": "2021-08-31T00:29:05+00:00" }, { "id": 63, @@ -501,7 +501,7 @@ "model": "Wrangler", "year": 2011, "price": 8684, - "created_at": "2021-06-24T10:38:05Z" + "created_at": "2021-06-24T10:38:05+00:00" }, { "id": 64, @@ -509,7 +509,7 @@ "model": "Expedition", "year": 2012, "price": 25653, - "created_at": "2021-07-01T16:13:20Z" + "created_at": "2021-07-01T16:13:20+00:00" }, { "id": 65, @@ -517,7 +517,7 @@ "model": "Avalanche 2500", "year": 2006, "price": 3158, - "created_at": "2021-08-14T10:55:13Z" + "created_at": "2021-08-14T10:55:13+00:00" }, { "id": 66, @@ -525,7 +525,7 @@ "model": "Mazda3", "year": 2012, "price": 79820, - "created_at": "2021-05-25T21:55:52Z" + "created_at": "2021-05-25T21:55:52+00:00" }, { "id": 67, @@ -533,7 +533,7 @@ "model": "Tacoma", "year": 2005, "price": 73572, - "created_at": "2021-01-22T09:56:02Z" + "created_at": "2021-01-22T09:56:02+00:00" }, { "id": 68, @@ -541,7 +541,7 @@ "model": "Explorer Sport", "year": 2000, "price": 64579, - "created_at": "2021-02-16T06:56:06Z" + "created_at": "2021-02-16T06:56:06+00:00" }, { "id": 69, @@ -549,7 +549,7 @@ "model": "Savana Cargo Van", "year": 2006, "price": 65944, - "created_at": "2021-09-12T14:08:53Z" + "created_at": "2021-09-12T14:08:53+00:00" }, { "id": 70, @@ -557,7 +557,7 @@ "model": "HHR", "year": 2009, "price": 8953, - "created_at": "2021-08-17T04:25:43Z" + "created_at": "2021-08-17T04:25:43+00:00" }, { "id": 71, @@ -565,7 +565,7 @@ "model": "Bronco II", "year": 1989, "price": 41811, - "created_at": "2021-07-14T14:20:28Z" + "created_at": "2021-07-14T14:20:28+00:00" }, { "id": 72, @@ -573,7 +573,7 @@ "model": "Suburban 2500", "year": 2011, "price": 57488, - "created_at": "2021-09-22T12:32:57Z" + "created_at": "2021-09-22T12:32:57+00:00" }, { "id": 73, @@ -581,7 +581,7 @@ "model": "Grand Vitara", "year": 2008, "price": 6408, - "created_at": "2021-11-12T23:19:52Z" + "created_at": "2021-11-12T23:19:52+00:00" }, { "id": 74, @@ -589,7 +589,7 @@ "model": "Mazda6", "year": 2012, "price": 14805, - "created_at": "2021-06-01T01:55:32Z" + "created_at": "2021-06-01T01:55:32+00:00" }, { "id": 75, @@ -597,7 +597,7 @@ "model": "Tahoe", "year": 1998, "price": 33585, - "created_at": "2022-01-09T04:28:54Z" + "created_at": "2022-01-09T04:28:54+00:00" }, { "id": 76, @@ -605,7 +605,7 @@ "model": "Explorer Sport Trac", "year": 2010, "price": 2087, - "created_at": "2022-03-28T00:28:16Z" + "created_at": "2022-03-28T00:28:16+00:00" }, { "id": 77, @@ -613,7 +613,7 @@ "model": "F150", "year": 2007, "price": 17621, - "created_at": "2021-03-23T15:08:10Z" + "created_at": "2021-03-23T15:08:10+00:00" }, { "id": 78, @@ -621,7 +621,7 @@ "model": "Taurus", "year": 1995, "price": 16478, - "created_at": "2021-06-07T22:29:50Z" + "created_at": "2021-06-07T22:29:50+00:00" }, { "id": 79, @@ -629,7 +629,7 @@ "model": "Truck", "year": 1992, "price": 70616, - "created_at": "2022-01-30T05:14:02Z" + "created_at": "2022-01-30T05:14:02+00:00" }, { "id": 80, @@ -637,7 +637,7 @@ "model": "Colt", "year": 1994, "price": 34163, - "created_at": "2022-04-02T18:06:30Z" + "created_at": "2022-04-02T18:06:30+00:00" }, { "id": 81, @@ -645,7 +645,7 @@ "model": "RX-7", "year": 1991, "price": 29634, - "created_at": "2021-01-06T10:30:59Z" + "created_at": "2021-01-06T10:30:59+00:00" }, { "id": 82, @@ -653,7 +653,7 @@ "model": "Grand Prix", "year": 1984, "price": 88575, - "created_at": "2021-02-24T06:06:57Z" + "created_at": "2021-02-24T06:06:57+00:00" }, { "id": 83, @@ -661,7 +661,7 @@ "model": "Mazdaspeed 3", "year": 2012, "price": 77723, - "created_at": "2021-11-11T22:48:05Z" + "created_at": "2021-11-11T22:48:05+00:00" }, { "id": 84, @@ -669,7 +669,7 @@ "model": "Spider", "year": 1992, "price": 64288, - "created_at": "2021-01-06T03:50:27Z" + "created_at": "2021-01-06T03:50:27+00:00" }, { "id": 85, @@ -677,7 +677,7 @@ "model": "S8", "year": 2002, "price": 33718, - "created_at": "2021-07-21T11:14:54Z" + "created_at": "2021-07-21T11:14:54+00:00" }, { "id": 86, @@ -685,7 +685,7 @@ "model": "Amigo", "year": 1992, "price": 53335, - "created_at": "2022-03-02T10:42:21Z" + "created_at": "2022-03-02T10:42:21+00:00" }, { "id": 87, @@ -693,7 +693,7 @@ "model": "Paseo", "year": 1996, "price": 74558, - "created_at": "2021-10-02 14:54:58Z" + "created_at": "2021-10-02 14:54:58+00:00" }, { "id": 88, @@ -701,7 +701,7 @@ "model": "Continental Mark VII", "year": 1986, "price": 42150, - "created_at": "2021-10-02T04:48:53Z" + "created_at": "2021-10-02T04:48:53+00:00" }, { "id": 89, @@ -709,7 +709,7 @@ "model": "Dakota", "year": 1997, "price": 64516, - "created_at": "2021-09-09T23:13:26Z" + "created_at": "2021-09-09T23:13:26+00:00" }, { "id": 90, @@ -717,7 +717,7 @@ "model": "Tahoe", "year": 1998, "price": 51461, - "created_at": "2021-04-06T08:29:19Z" + "created_at": "2021-04-06T08:29:19+00:00" }, { "id": 91, @@ -725,7 +725,7 @@ "model": "Vibe", "year": 2006, "price": 12134, - "created_at": "2021-01-11T22:30:14Z" + "created_at": "2021-01-11T22:30:14+00:00" }, { "id": 92, @@ -733,7 +733,7 @@ "model": "Eos", "year": 2011, "price": 53128, - "created_at": "2021-01-12T23:25:06Z" + "created_at": "2021-01-12T23:25:06+00:00" }, { "id": 93, @@ -741,7 +741,7 @@ "model": "Mazdaspeed6", "year": 2007, "price": 90902, - "created_at": "2021-12-29T14:29:03Z" + "created_at": "2021-12-29T14:29:03+00:00" }, { "id": 94, @@ -749,7 +749,7 @@ "model": "Xterra", "year": 2005, "price": 41532, - "created_at": "2021-09-07 09:00:49Z" + "created_at": "2021-09-07 09:00:49+00:00" }, { "id": 95, @@ -757,7 +757,7 @@ "model": "Sable", "year": 2005, "price": 71337, - "created_at": "2021-01-31T22:13:44Z" + "created_at": "2021-01-31T22:13:44+00:00" }, { "id": 96, @@ -765,7 +765,7 @@ "model": "330", "year": 2006, "price": 14494, - "created_at": "2021-09-17T20:52:48Z" + "created_at": "2021-09-17T20:52:48+00:00" }, { "id": 97, @@ -773,7 +773,7 @@ "model": "R8", "year": 2008, "price": 17642, - "created_at": "2021-09-21T11:56:24Z" + "created_at": "2021-09-21T11:56:24+00:00" }, { "id": 98, @@ -781,7 +781,7 @@ "model": "CTS-V", "year": 2007, "price": 19914, - "created_at": "2021-09-02T15:38:46Z" + "created_at": "2021-09-02T15:38:46+00:00" }, { "id": 99, @@ -789,7 +789,7 @@ "model": "1500 Club Coupe", "year": 1997, "price": 82288, - "created_at": "2021-04-20T18:58:15Z" + "created_at": "2021-04-20T18:58:15+00:00" }, { "id": 100, @@ -797,6 +797,6 @@ "model": "Somerset", "year": 1986, "price": 64148, - "created_at": "2021-06-10T19:07:38Z" + "created_at": "2021-06-10T19:07:38+00:00" } ] diff --git a/airbyte-integrations/connectors/source-faker/source_faker/products_catalog.json b/airbyte-integrations/connectors/source-faker/source_faker/products_catalog.json index 484f58f8bd13..cf745b06ed58 100644 --- a/airbyte-integrations/connectors/source-faker/source_faker/products_catalog.json +++ b/airbyte-integrations/connectors/source-faker/source_faker/products_catalog.json @@ -10,7 +10,7 @@ "created_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" } } } diff --git a/airbyte-integrations/connectors/source-faker/source_faker/purchases_catalog.json b/airbyte-integrations/connectors/source-faker/source_faker/purchases_catalog.json index 7d07183a028f..d79a797ad83f 100644 --- a/airbyte-integrations/connectors/source-faker/source_faker/purchases_catalog.json +++ b/airbyte-integrations/connectors/source-faker/source_faker/purchases_catalog.json @@ -8,17 +8,17 @@ "added_to_cart_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, "purchased_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, "returned_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" } } } diff --git a/airbyte-integrations/connectors/source-faker/source_faker/source.py b/airbyte-integrations/connectors/source-faker/source_faker/source.py index 3908f3c2e9d2..6e664751df24 100644 --- a/airbyte-integrations/connectors/source-faker/source_faker/source.py +++ b/airbyte-integrations/connectors/source-faker/source_faker/source.py @@ -23,7 +23,8 @@ Type, ) from airbyte_cdk.sources import Source -from faker import Faker +from mimesis import Datetime, Person +from mimesis.locales import Locale class SourceFaker(Source): @@ -108,8 +109,8 @@ def read( records_per_sync: int = config["records_per_sync"] if "records_per_sync" in config else 500 records_per_slice: int = config["records_per_slice"] if "records_per_slice" in config else 100 - Faker.seed(seed) - fake = Faker() + person = Person(locale=Locale.EN, seed=seed) + dt = Datetime(seed=seed) to_generate_users = False to_generate_purchases = False @@ -136,14 +137,14 @@ def read( records_in_page = 0 for i in range(cursor, count): - user = generate_user(fake, i) + user = generate_user(person, dt, i) yield generate_record(stream, user) total_records += 1 records_in_sync += 1 records_in_page += 1 if to_generate_purchases: - purchases = generate_purchases(fake, user, purchases_count) + purchases = generate_purchases(user, purchases_count) for p in purchases: yield generate_record(purchases_stream, p) purchases_count += 1 @@ -184,7 +185,7 @@ def generate_record(stream: any, data: any): # timestamps need to be emitted in ISO format for key in dict: if isinstance(dict[key], datetime.datetime): - dict[key] = dict[key].isoformat() + dict[key] = format_airbyte_time(dict[key]) return AirbyteMessage( type=Type.RECORD, @@ -210,22 +211,39 @@ def generate_state(state: Dict[str, any], stream: any, data: any): return AirbyteMessage(type=Type.STATE, state=AirbyteStateMessage(data=state)) -def generate_user(fake: Faker, user_id: int): - profile = fake.profile() - del profile["birthdate"] # the birthdate field seems to not obey the seed at the moment, so we'll ignore it +def generate_user(person: Person, dt: Datetime, user_id: int): + time_a = dt.datetime() + time_b = dt.datetime() - time_a = fake.date_time() - time_b = fake.date_time() - metadata = { + profile = { "id": user_id + 1, "created_at": time_a if time_a <= time_b else time_b, "updated_at": time_a if time_a > time_b else time_b, + "name": person.name(), + "title": person.title(), + "age": person.age(), + "email": person.email(), + "telephone": person.telephone(), + "gender": person.gender(), + "language": person.language(), + "academic_degree": person.academic_degree(), + "nationality": person.nationality(), + "occupation": person.occupation(), + "height": person.height(), + "blood_type": person.blood_type(), + "weight": person.weight(), } - profile.update(metadata) + + while not profile["created_at"]: + profile["created_at"] = dt.datetime() + + if not profile["updated_at"]: + profile["updated_at"] = profile["created_at"] + 1 + return profile -def generate_purchases(fake: Faker, user: any, purchases_count: int) -> list[Dict]: +def generate_purchases(user: any, purchases_count: int) -> list[Dict]: purchases: list[Dict] = [] purchase_percent_remaining = 80 # ~ 20% of people will have no purchases total_products = len(generate_products()) @@ -269,6 +287,16 @@ def read_json(filepath): def random_date_in_range(start_date: datetime.datetime, end_date: datetime.datetime = datetime.datetime.now()) -> datetime.datetime: time_between_dates = end_date - start_date days_between_dates = time_between_dates.days + if days_between_dates < 2: + days_between_dates = 2 random_number_of_days = random.randrange(days_between_dates) random_date = start_date + datetime.timedelta(days=random_number_of_days) return random_date + + +def format_airbyte_time(d: datetime): + s = f"{d}" + s = s.split(".")[0] + s = s.replace(" ", "T") + s += "+00:00" + return s diff --git a/airbyte-integrations/connectors/source-faker/source_faker/users_catalog.json b/airbyte-integrations/connectors/source-faker/source_faker/users_catalog.json index 28b2410e0a8a..1a9f8bbb4aa5 100644 --- a/airbyte-integrations/connectors/source-faker/source_faker/users_catalog.json +++ b/airbyte-integrations/connectors/source-faker/source_faker/users_catalog.json @@ -6,24 +6,25 @@ "created_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, "updated_at": { "type": "string", "format": "date-time", - "airbyte_type": "timestamp_without_timezone" + "airbyte_type": "timestamp_with_timezone" }, - "job": { "type": "string" }, - "company": { "type": "string" }, - "ssn": { "type": "string" }, - "residence": { "type": "string" }, - "current_location": { "type": "array" }, - "blood_group": { "type": "string" }, - "website": { "type": "array" }, - "username": { "type": "string" }, "name": { "type": "string" }, - "sex": { "type": "string" }, - "address": { "type": "string" }, - "mail": { "type": "string" } + "title": { "type": "string" }, + "age": { "type": "integer" }, + "email": { "type": "string" }, + "telephone": { "type": "string" }, + "gender": { "type": "string" }, + "language": { "type": "string" }, + "academic_degree": { "type": "string" }, + "nationality": { "type": "string" }, + "occupation": { "type": "string" }, + "height": { "type": "string" }, + "blood_type": { "type": "string" }, + "weight": { "type": "integer" } } } diff --git a/airbyte-integrations/connectors/source-faker/unit_tests/unit_test.py b/airbyte-integrations/connectors/source-faker/unit_tests/unit_test.py index 93df146d0c0d..0db54325bffa 100644 --- a/airbyte-integrations/connectors/source-faker/unit_tests/unit_test.py +++ b/airbyte-integrations/connectors/source-faker/unit_tests/unit_test.py @@ -18,20 +18,21 @@ def test_source_streams(): assert len(schemas) == 3 assert schemas[0]["properties"] == { "id": {"type": "number"}, - "created_at": {"type": "string", "format": "date-time", "airbyte_type": "timestamp_without_timezone"}, - "updated_at": {"type": "string", "format": "date-time", "airbyte_type": "timestamp_without_timezone"}, - "job": {"type": "string"}, - "company": {"type": "string"}, - "ssn": {"type": "string"}, - "residence": {"type": "string"}, - "current_location": {"type": "array"}, - "blood_group": {"type": "string"}, - "website": {"type": "array"}, - "username": {"type": "string"}, + "created_at": {"type": "string", "format": "date-time", "airbyte_type": "timestamp_with_timezone"}, + "updated_at": {"type": "string", "format": "date-time", "airbyte_type": "timestamp_with_timezone"}, "name": {"type": "string"}, - "sex": {"type": "string"}, - "address": {"type": "string"}, - "mail": {"type": "string"}, + "title": {"type": "string"}, + "age": {"type": "integer"}, + "email": {"type": "string"}, + "telephone": {"type": "string"}, + "gender": {"type": "string"}, + "language": {"type": "string"}, + "academic_degree": {"type": "string"}, + "nationality": {"type": "string"}, + "occupation": {"type": "string"}, + "height": {"type": "string"}, + "blood_type": {"type": "string"}, + "weight": {"type": "integer"}, } for schema in schemas: @@ -162,8 +163,8 @@ def test_read_with_seed(): iterator = source.read(logger, config, catalog, state) records = [row for row in iterator if row.type is Type.RECORD] - assert records[0].record.data["company"] == "Gibson-Townsend" - assert records[0].record.data["mail"] == "zamoradenise@yahoo.com" + assert records[0].record.data["occupation"] == "Roadworker" + assert records[0].record.data["email"] == "reproduce1856@outlook.com" def test_ensure_no_purchases_without_users(): diff --git a/docs/integrations/sources/faker.md b/docs/integrations/sources/faker.md index 020ca88deeac..54332a4f0ad0 100644 --- a/docs/integrations/sources/faker.md +++ b/docs/integrations/sources/faker.md @@ -41,6 +41,7 @@ N/A | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------- | +| 0.2.0 | 2022-10-14 | [18021](https://github.com/airbytehq/airbyte/pull/18021) | Move to mimesis for speed! | | 0.1.8 | 2022-10-12 | [17889](https://github.com/airbytehq/airbyte/pull/17889) | Bump to test publish command (2) | | 0.1.7 | 2022-10-11 | [17848](https://github.com/airbytehq/airbyte/pull/17848) | Bump to test publish command | | 0.1.6 | 2022-09-07 | [16418](https://github.com/airbytehq/airbyte/pull/16418) | Log start of each stream |