Created
March 13, 2018 16:23
-
-
Save nurey/53f7b65c6f70a0ba759c32128e5a66fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var source = rethinkdb({ | |
// "uri": "${RETHINKDB_URI}" | |
"uri": "rethink://localhost:28015/foundation", | |
// "timeout": "30s", | |
"tail": true | |
// "ssl": false | |
// "cacerts": ["/path/to/cert.pem"] | |
}) | |
var sink = postgres({ | |
// "uri": "${POSTGRESQL_URI}" | |
"uri": "postgres://ilia@localhost:5432/client_app_development?sslmode=disable" | |
// "debug": false, | |
// "tail": false, | |
// "replication_slot": "slot" | |
}) | |
t.Source("source", source, "sold_listings") | |
.Transform(pick({ | |
"fields": | |
["id", "days-on-market", "mls", "price", "sold-date", "sold-price", "postal-code"] | |
})) | |
.Transform(rename({ | |
"field_map": { | |
"id": "rethink_id", | |
"days-on-market": "days_on_market", | |
"sold-date": "sold_date", | |
"sold-price": "sold_price", | |
"postal-code": "postal_code" | |
} | |
})) | |
.Save("sink", sink, "sold_listings") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment