1
0
mirror of synced 2025-12-20 18:39:31 -05:00
Files
airbyte/airbyte-integrations/connectors/source-fauna/examples/setup_database.fql
Neil Macneale V 65e616877a 🎉 New source: Fauna (#15274)
* Add fauna source

* Update changelog to include the correct PR

* Improve docs (#1)

* Applied suggestions to improve docs (#2)

* Applied suggestions to improve docs

* Cleaned up the docs

* Apply suggestions from code review

Co-authored-by: Ewan Edwards <46354154+faunaee@users.noreply.github.com>

* Update airbyte-integrations/connectors/source-fauna/source_fauna/spec.yaml

Co-authored-by: Ewan Edwards <46354154+faunaee@users.noreply.github.com>

Co-authored-by: Ewan Edwards <46354154+faunaee@users.noreply.github.com>

* Flake Checker (#3)

* Run ./gradlew :airbyte-integrations:connectors:source-fauna:flakeCheck

* Fix all the warnings

* Set additionalProperties to true to adhere to acceptance tests

* Remove custom fields (#4)

* Remove custom fields from source.py

* Remove custom fields from spec.yaml

* Collections that support incremental sync are found correctly

* Run formatter

* Index values and termins are verified

* Stripped additional_columns from collection config and check()

* We now search for an index at the start of each sync

* Add default for missing data in collection

* Add a log message about the index chosen to sync an incremental stream

* Add an example for a configured incremental catalog

* Check test now validates the simplified check function

* Remove collection name from spec.yaml and CollectionConfig

* Update test_util.py to ahere to the new config

* Update the first discover test to validate that we can find indexes correctly

* Remove other discover tests, as they no longer apply

* Full refresh test now works with simplified expanded columns

* Remove unused imports

* Incremental test now adheres to the find_index_for_stream system

* Database test passes, so now all unit tests pass again

* Remove extra fields from required section

* ttl is nullable

* Data defaults to an empty object

* Update tests to reflect ttl and data select changes

* Fix expected records. All unit tests and acceptance tests pass

* Cleanup docs for find_index_for_stream

* Update setup guide to reflect multiple collections

* Add docs to install the fauna shell

* Update examples and README to conform to the removal of additional columns

Co-authored-by: Ewan Edwards <46354154+faunaee@users.noreply.github.com>
2022-09-29 10:37:03 -03:00

80 lines
1.1 KiB
Plaintext

If(
Exists(Collection("foo")),
"OK",
CreateCollection({
name: "foo",
})
)
If(
Exists(Collection("other")),
"OK",
CreateCollection({
name: "other",
})
)
If(
Exists(Ref(Collection("other"), "123")),
"OK",
Create(Ref(Collection("other"), "123"))
)
Do(
Create(Collection("foo"), {
data: {
a: 5,
nested: {
value: 15,
},
},
}),
Create(Collection("foo"), {
data: {
a: 6,
nested: {
value: 20,
},
},
}),
Create(Collection("foo"), {
data: {
a: 7,
nested: {
value: 25,
},
},
}),
Create(Collection("foo"), {
data: {
a: 8,
nested: {
value: 30,
},
},
}),
Create(Collection("foo"), {
data: {
a: 9,
nested: {
value: 30,
},
"my-ref": Ref(Collection("other"), "123"),
string: "cat",
timestamp: Now(),
number: 12,
date: Date('2012-02-01')
},
}),
)
CreateIndex({
name: "ts",
source: Collection("foo"),
terms: [],
values: [
{ field: "ts" },
{ field: "ref" },
],
})