cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-723568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECome%20evitare%20che%20i%20millisecondi%20scompaiano%20durante%20l'importazione%20dei%20dati%20dal%20database%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECiao%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ETLDR%3A%20esiste%20un%20modo%20per%20mantenere%20i%20millisecondi%20quando%20i%20dati%20vengono%20importati%20da%20un%20database%3F%20Importa%20JSON%2C%20i%20millisecondi%20del%20timestamp%20si%20trasformano%20tutti%20in%200.%20JMP%2016.2%2F17.0%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EAl%20momento%20ho%20uno%20script%20JSL%20che%20estrae%20i%20dati%20JSON%20da%20un%20database%3C%2FP%3E%3CP%3Ees%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%3EQuesto%20script%20ha%20funzionato%20senza%20problemi%2C%20tranne%20per%20il%20fatto%20che%20nella%20granularit%C3%A0%20della%20colonna%20timestamp%20mancano%20i%20millisecondi.%3C%2FP%3E%3CP%3ENel%20file%20JSON%20originale%2C%20il%20timestamp%20ha%20millisecondi%20(%22TIME_STAMP%22%3A%222022%5C%2F08%5C%2F10%20%3CSTRONG%3E17%3A00%3A37.130%3C%2FSTRONG%3E%20%22)%20ma%20in%20JMP%2C%20il%20timestamp%20non%20ha%20pi%C3%B9%20millisecondi.%20Anche%20se%20modifico%20le%20informazioni%20sulla%20colonna%20per%20avere%20pi%C3%B9%20posizioni%20decimali%2C%20i%20millisecondi%20sono%20tutti%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%3ELa%20mancanza%20dei%20millisecondi%20causa%20problemi%20di%20analisi%20a%20causa%20dell'ordinamento%20errato%20delle%20righe.%20Ho%20davvero%20bisogno%20della%20granularit%C3%A0%20dei%20millisecondi%20nei%20miei%20dati.%3C%2FP%3E%3CP%3EQualcuno%20sa%20come%20risolvere%20questo%20problema%20relativo%20al%20motivo%20per%20cui%20i%20millisecondi%20scompaiono%20durante%20l'importazione%20dei%20dati%3F%3C%2FP%3E%3CP%3EQualche%20indizio%20per%20evitare%20che%20ci%C3%B2%20accada%3F%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EGrazie%20a%20tutti%20in%20anticipo%20per%20l'aiuto!!!%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%3EAutomazione%20e%20scripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAnalisi%20e%20modellazione%20dei%20dati%20di%20base%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAccesso%20ai%20dati%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%3A%20Come%20evitare%20che%20i%20millisecondi%20scompaiano%20durante%20l'importazione%20di%20dati%20dal%20database%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESospetto%20che%20la%20correzione%20riguarder%C3%A0%20l'estremit%C3%A0%20del%20database%2C%20non%20l'estremit%C3%A0%20di%20JMP%2C%20ad%20esempio%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%20possibilmente%20specifico%20per%20il%20marchio%20del%20database.%3C%2FP%3E%0A%3CP%3EPer%20ovviare%20al%20problema%2C%20potresti%20esportare%20CSV%20dal%20database%2C%20anche%20se%20potrebbe%20essere%20necessaria%20la%20stessa%20correzione.%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%3EImporta%20le%20frazioni%20di%20secondo%20OK%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3Emodifica%3A%20potrebbe%20essere%20meno%20che%20chiaro%3B%20%22all'estremit%C3%A0%20del%20database%22%20significa%20ancora%20modificare%20la%20query%20per%20fare%20in%20modo%20che%20il%20database%20invii%20i%20dati.%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%3A%20Come%20evitare%20che%20i%20millisecondi%20scompaiano%20durante%20l'importazione%20di%20dati%20dal%20database%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723927%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECiao%20Craige_Hales.%3CBR%20%2F%3E%3CBR%20%2F%3E%20Grazie%20per%20il%20suggerimento%3CBR%20%2F%3E%20Vuoi%20dire%20che%2C%20nel%20mio%20caso%2C%20la%20query%20per%20importare%20i%20dati%20JSON%20deve%20essere%20modificata%20per%20tenere%20conto%20dei%20millisecondi%3F%20Ho%20controllato%20i%20dati%20JSON%20e%20sicuramente%20contengono%20i%20millisecondi%20necessari%2C%20ma%20non%20sono%20riuscito%20a%20trovare%20una%20soluzione%20per%20importarli%20correttamente%20in%20JMP.%20Hai%20qualche%20indicazione%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%20nota%3A%20lavoro%20con%20set%20di%20dati%20di%20grandi%20dimensioni%20e%20estraggo%20centinaia%20di%20file%20JSON%2C%20tutti%20automatizzati%20con%20script%20JSL.%20Sarebbe%20meno%20ideale%20importarlo%20in%20un%20CSV%20e%20poi%20importarlo%20ogni%20volta%20in%20JMP.%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