cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
%3CLINGO-SUB%20id%3D%22lingo-sub-723568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EComment%20emp%C3%AAcher%20les%20millisecondes%20de%20dispara%C3%AEtre%20lors%20de%20l'importation%20de%20donn%C3%A9es%20depuis%20la%20base%20de%20donn%C3%A9es%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EBonjour%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ETLDR%26nbsp%3B%3A%20Existe-t-il%20un%20moyen%20de%20conserver%20les%20millisecondes%20lorsque%20les%20donn%C3%A9es%20sont%20import%C3%A9es%20depuis%20une%20base%20de%20donn%C3%A9es%26nbsp%3B%3F%20Importez%20JSON%2C%20les%20millisecondes%20d'horodatage%20se%20transforment%20toutes%20en%200.%20JMP16.2%2F17.0%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJ'ai%20actuellement%20un%20script%20JSL%20qui%20extrait%20les%20donn%C3%A9es%20JSON%20d'une%20base%20de%20donn%C3%A9es%3C%2FP%3E%3CP%3Eex%20-%26gt%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EData%20Table(open%20database(dsn_string%2C%20sql_string%2C%20table_name%2C%20Invisible(1)))%3B%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3CP%3ECe%20script%20a%20fonctionn%C3%A9%20sans%20probl%C3%A8me%2C%20sauf%20que%20la%20granularit%C3%A9%20de%20la%20colonne%20d'horodatage%20manque%20les%20millisecondes.%3C%2FP%3E%3CP%3EDans%20le%20fichier%20JSON%20d'origine%2C%20l'horodatage%20est%20en%20millisecondes%20(%22TIME_STAMP%22%3A%20%222022%5C%2F08%5C%2F10%20%3CSTRONG%3E17%3A00%3A37.130%3C%2FSTRONG%3E%20%22)%20mais%20dans%20JMP%2C%20l'horodatage%20n'a%20plus%20de%20millisecondes.%20M%C3%AAme%20si%20je%20modifie%20les%20informations%20sur%20la%20colonne%20pour%20avoir%20plus%20de%20positions%20d%C3%A9cimales%2C%20les%20millisecondes%20sont%20toutes%20des%200.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Glo_Roh_0-1707528437200.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F61028i2546EDA00AD4639F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Glo_Roh_0-1707528437200.png%22%20alt%3D%22Glo_Roh_0-1707528437200.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ELe%20fait%20de%20manquer%20les%20millisecondes%20entra%C3%AEne%20des%20probl%C3%A8mes%20d'analyse%20en%20raison%20d'un%20tri%20incorrect%20des%20lignes.%20J'ai%20vraiment%20besoin%20de%20la%20granularit%C3%A9%20des%20millisecondes%20dans%20mes%20donn%C3%A9es.%3C%2FP%3E%3CP%3EQuelqu'un%20sait-il%20comment%20r%C3%A9soudre%20ce%20probl%C3%A8me%20de%20disparition%20des%20millisecondes%20lors%20de%20l'importation%20de%20donn%C3%A9es%26nbsp%3B%3F%3C%2FP%3E%3CP%3EDes%20indices%20pour%20%C3%A9viter%20que%20cela%20se%20produise%20%3F%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EMerci%20d'avance%20%C3%A0%20tous%20pour%20votre%20aide%20!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-723568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomatisation%20et%20scripts%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAnalyse%20et%20mod%C3%A9lisation%20des%20donn%C3%A9es%20de%20base%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAcc%C3%A8s%20aux%20donn%C3%A9es%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-723590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%20%3A%20Comment%20emp%C3%AAcher%20les%20millisecondes%20de%20dispara%C3%AEtre%20lors%20de%20l'importation%20de%20donn%C3%A9es%20depuis%20la%20base%20de%20donn%C3%A9es%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJe%20soup%C3%A7onne%20que%20le%20correctif%20sera%20du%20c%C3%B4t%C3%A9%20de%20la%20base%20de%20donn%C3%A9es%2C%20pas%20du%20c%C3%B4t%C3%A9%20JMP%2C%20par%20exemple%2C%20%3CA%20href%3D%22https%3A%2F%2Fdatabase.guide%2Fhow-to-return-fractional-seconds-from-a-datetime-value-in-oracle%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fdatabase.guide%2Fhow-to-return-fractional-seconds-from-a-datetime-value-in-oracle%2F%3C%2FA%3E%20%2C%20%C3%A9ventuellement%20sp%C3%A9cifique%20%C3%A0%20la%20marque%20de%20la%20base%20de%20donn%C3%A9es.%3C%2FP%3E%0A%3CP%3EPour%20contourner%20le%20probl%C3%A8me%2C%20vous%20pouvez%20exporter%20un%20fichier%20CSV%20%C3%A0%20partir%20de%20la%20base%20de%20donn%C3%A9es%2C%20m%C3%AAme%20si%20le%20m%C3%AAme%20correctif%20peut%20%C3%AAtre%20n%C3%A9cessaire.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Imports%20the%20fractional%20seconds%20OK%22%20style%3D%22width%3A%20638px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Imports%20the%20fractional%20seconds%20OK%22%20style%3D%22width%3A%20638px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Imports%20the%20fractional%20seconds%20OK%22%20style%3D%22width%3A%20638px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F61029i51388CA4D798029D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22capture.png%22%20alt%3D%22Imports%20the%20fractional%20seconds%20OK%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImports%20the%20fractional%20seconds%20OK%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImports%20the%20fractional%20seconds%20OK%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EImporte%20les%20fractions%20de%20secondes%20OK%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3Eedit%20%3A%20cela%20pourrait%20%C3%AAtre%20loin%20d'%C3%AAtre%20clair%20%3B%20%22du%20c%C3%B4t%C3%A9%20de%20la%20base%20de%20donn%C3%A9es%22%20signifie%20toujours%20modifier%20la%20requ%C3%AAte%20pour%20que%20la%20base%20de%20donn%C3%A9es%20envoie%20les%20donn%C3%A9es.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-723927%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%20%3A%20Comment%20emp%C3%AAcher%20les%20millisecondes%20de%20dispara%C3%AEtre%20lors%20de%20l'importation%20de%20donn%C3%A9es%20depuis%20la%20base%20de%20donn%C3%A9es%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723927%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESalut%20Craige_Hales.%3CBR%20%2F%3E%3CBR%20%2F%3E%20Merci%20pour%20la%20suggestion.%3CBR%20%2F%3E%20Voulez-vous%20dire%20que%2C%20dans%20mon%20cas%2C%20la%20requ%C3%AAte%20d'importation%20des%20donn%C3%A9es%20JSON%20doit%20%C3%AAtre%20modifi%C3%A9e%20pour%20tenir%20compte%20des%20millisecondes%26nbsp%3B%3F%20J'ai%20v%C3%A9rifi%C3%A9%20les%20donn%C3%A9es%20JSON%20et%20elles%20contiennent%20certainement%20les%20millisecondes%20n%C3%A9cessaires%2C%20mais%20je%20n'ai%20pas%20trouv%C3%A9%20de%20solution%20pour%20importer%20correctement%20dans%20JMP.%20Avez-vous%20des%20indications%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%20Remarque%26nbsp%3B%3A%20je%20travaille%20avec%20de%20grands%20ensembles%20de%20donn%C3%A9es%20et%20j'extraire%20des%20centaines%20de%20fichiers%20JSON%20qui%20sont%20tous%20automatis%C3%A9s%20avec%20des%20scripts%20JSL.%20Il%20serait%20loin%20d'%C3%AAtre%20id%C3%A9al%20d'importer%20dans%20un%20fichier%20CSV%2C%20puis%20de%20l'importer%20dans%20JMP%20%C3%A0%20chaque%20fois.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Glo_Roh
Level II

How to prevent Milliseconds from disappearing during Import Data from Database?

Hello, 

 

TLDR: Is there a way to keep milliseconds when data is imported from a database? Import JSON, timestamp milliseconds all turn into 0's. JMP 16.2/17.0

 

I currently have a JSL script that pulls json data from a database

 ex ->  

Data Table(open database(dsn_string, sql_string, table_name, Invisible(1))); 

 

This script has been working with no issues except that the granularity of the timestamp column are missing the milliseconds.

In the original JSON file, the timestamp have milliseconds ("TIME_STAMP":"2022\/08\/10 17:00:37.130") but in JMP, the timestamp no longer has milliseconds. Even if I edit the Column Info to have more decimals positions, milliseconds are all 0's.

 

Glo_Roh_0-1707528437200.png

 

Missing the milliseconds is causing analysis issues due to rows being sorted incorrectly. I really need the granularity of milliseconds in my data.

Does anyone know how to solve this issue of why milliseconds disappear during data import?

Any clues to prevent this from occurring?

 

Thank you all in advance for the help!!!

3 REPLIES 3
Craige_Hales
Super User

Re: How to prevent Milliseconds from disappearing during Import Data from Database?

I suspect the fix will be on the database end, not the JMP end, for example, https://database.guide/how-to-return-fractional-seconds-from-a-datetime-value-in-oracle/ , possibly specific to the database brand.

As a work-around, you might export CSV from the database, though it might need the same fix.

Imports the fractional seconds OKImports the fractional seconds OK

 

edit: that might be less than clear; "on the database end" still means editing the query to make the database send the data.

Craige
Glo_Roh
Level II

Re: How to prevent Milliseconds from disappearing during Import Data from Database?

Hi Craige_Hales.

Thanks for the suggestion.
Do you mean that, in my case, the query to import the JSON data needs to be edited to account for milliseconds? I've checked the JSON data and it for sure has the necessary milliseconds, but I have not been able to find a solution to import correctly into JMP. Do you have any pointers?

note: I work with large datasets and pull 100's of JSON files that are all automated with JSL scripts. It would less then ideal to import into a csv then import that into JMP every time.

Craige_Hales
Super User

Re: How to prevent Milliseconds from disappearing during Import Data from Database?

Do you mean that, in my case, the query to import the JSON data needs to be edited to account for milliseconds?

that is what I was describing. I believe the link might be helpful. I'm not more than an occasional SQL user; others will know more. From the link it is pretty clear that all SQL are not the same. You should add which SQL variant you are dealing with. Though it seems likely that the SQL to convert a date to a string before sending it to JMP might be fairly standard.

 

edit: re-reading...I'm confused. where is JSON coming from? Are you reading JSON with JMP? or are you using JMP's SQL support? Probably need to see a bit more of what you are doing.

Craige