Comments (3)
I stumbled upon same issue while trying to import dates.
Until the issue is solved you can use onCreate trigger to correct the date.
Eg.:
exports.onSlotCreate = functions
.firestore.document('docs/{docId}')
.onCreate(async (snapshot, context) => {
const docData = snapshot.data();
let update = false;
if (typeof docData.date === "string") {
docData.date = new Date(docData.date);
update = true;
}
if (update) {
db.collection('docs').doc(snapshot.id).update({date: docData.date});
}
});
from rowy.
@notsidney I think, all the fields are being imported as strings in the Firestore, and hence the Data Parser shows Something went wrong
in the Date call.
I tried importing the following fields:
- name : string
- profilePictureUrl : string
- rating : number
- review : string
- reviewId : string
- timestamp : Date
with following csv:
name,profilePictureUrl,rating,review,reviewId,timestamp
Madhuri Salunkhe,,5,,temp_review,11/11/2020
Data Key Mapping Screen:
Firetable Post Import Screen
Actual Firestore Data Stored:
All the fields were directly added to Firestore as strings.
I think this could be the function which needs modification for type aware data importing.
https://github.com/AntlerVC/firetable/blob/fd036f59c7111b5105d69f94d183ccb1439eb0b7/www/src/components/Table/ImportCSV.tsx#L96-L105
from rowy.
Hi everyone, thanks for letting us know about this bug. I’m working on a new Import CSV wizard UI, which includes parsing date columns. We’ll be using date-fns’ parseJSON
function, which supports a bunch of formats similar to the ISO date string format. Please note that it assumes your date is in UTC time, so if your CSV’s date is not in UTC and your browser/system’s timezone is not UTC, Firetable (and Firestore) will display a different date/time value (converted from UTC to your local timezone).
👉 So before using the Import CSV feature, you must convert dates to UTC time and a supported format.
When rows are added, it will store dates as Firestore Timestamps, similar to adding a new row & inputting a date through the picker.
The new Import CSV wizard will be available as part of the next PR from develop to master.
from rowy.
Related Issues (20)
- error TS2304: Cannot find name 'RTCErrorDetailType'. HOT 3
- [UI] [BUG] - Filters in sub-table keeps refreshing HOT 10
- Add a delete/remove icon in Sorted button chip HOT 3
- BUG: Filter on the table works, but the same applied to the Table Filter doesn't HOT 12
- Sending Date using Webhook not working HOT 2
- Error while importing CSV to a table HOT 3
- Unable to connect an existing firebase project "load failed" HOT 4
- Improve row selection UI and accessibility HOT 1
- Error Setting Firestore/Storage Rules when Connecting Rowy to Firebase HOT 3
- BUG: copy/paste on Array Subtable filed gives an incorrect error HOT 6
- Out of order rows do not work with sorts/filters HOT 6
- Add fuzzy search to column type select popup HOT 6
- Animation to search tables gets slower as number of table grows HOT 7
- Failed deployment for dynamic default value for a column HOT 2
- Error when executing argon2 code in Buildship
- Bulk edit support - edit a number of rows at once HOT 1
- Error when importing table from firestore
- Importing existing data from subtable/map
- You're offline error (stuck) HOT 1
- Derived Columns Deploy Typescript Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rowy.