Coder Social home page Coder Social logo

faunadb-importer's Issues

Simplify status line

Right now it's confusing. I was thinking about something simpler and wait for feedback. Like:

Completed: 42% Errors: 2 RPS: 123 Latency(client/server): 12.2/5.2

Import of simple JSON File to faunadb-developer leads to error

For testing purposes I tried to import a very simple JSON file into the developer version of faunadb:

.\bin\faunadb-importer.bat import-file --endpoints http://localhost:8443 --secret ABCDEF --class simple test.json

Here is my import file (test.json):

[{
	"name": "ABC",
	"address": {
		"city": "Wien",
		"country": "AT",
		"street": "Testgasse 4",
		"zip": "1210"
	}
},
{
	"name": "DEF",
	"address": {
		"city": "Wien",
		"country": "AT",
		"street": "Testgasse 10",
		"zip": "1010"
	}
}
]

The error:

[2017-09-21 22:02:24] validation failed: Instance data is not valid. at line: 1, column: 1: [{ "name": "ABC", "address": { "city": "Wien", "country": "AT", "street": "Testgasse 4", "zip": "1210" } }, { "name": "DEF", "address": { "city": "Wien", "country": "AT", "street": "Testgasse 10", "zip": "1010" } }]

Upgrade faunadb driver

Version 1.2.0 of scala driver will allow us to:

  • Upgrade scala to 2.12.x
  • Upgrade jackson versio to 1.8 (which has some performance improvements)

Handle possible errors from FaunaDB

  • Apply backpressure when service is unavailable
  • Handle errors when the request is too large due to huge batch sizes
  • Implement a split and retry strategy for batches in order to find the error for a single instance rather than marking the whole batch as failed

Importing arrays of ref

Hi

We are looking to import csv with arrays of refs, is there a way to do this with the importer?

Examples code with a ref to another file - ref is currently a single ref but we have records which have multiple refs.

data/test1.csv:
  class: test1
  fields:
    - name: id
      type: ref

    - name: name
      type: string

  ignoredFields:
    - id

data/test2.csv:
  class: test2
  fields:
    - name: user_id
      type: ref(test1) # We would like this to be an array of brands

Thank you in advance!

Field marked as "ref" seems to be ignored

Hi,
I have a file with lines of JSON like
{
"id": "3924",
"name": "Mary"
}.

I can upload it with no problems but the "id" field that I mark as ref using the parameter
--format "id:ref"
is ignored and the record gets a different ref (generated automatically) like "198480451673784842"

Ref
q.Ref("classes/my-class/198480451673784842")
Class
q.Ref("classes/my-class")
TS
1525544559283937
Data
{
"id": "3924",
"name": "Mary"
}

Am I missing something?
Thank you

Cache not clear when running import

If errors occured during import, the next import attempt will failed too, because the temp working file (cache) is not cleared, i need to manually delete the file to make it works.

Importer needs a good readme

  • Usage instructions
  • Explain field syntax
  • Explain yaml file syntax
  • Explain constraints (like, do not remove a line from the import file if you're using row number as ids)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.