Pesquisar

Pergunta
· Jul. 1

Need to merge 2 pipe delimited files after converting it into json

The below code is not working. its unable retrieve Record count and merge files

Class Util

{

 

ClassMethod zPyRecordCount(inputfile) As %Integer [ Language = python ]

{

    import pandas as pd

    import iris

    import io

 

    try:

        df = pd.read_csv(inputfile, sep='|')

        recordcount=len(df.index)

        sys.stdout.write(len(df.index))

        return recordcount

 

    except Exception as e:

        return 0

}

 

ClassMethod zPymergefiles(file1, file2, outputfilename) As %Boolean [ Language = python ]

{

 

    import pandas as pd

    import iris

    import io

 

    try:

        dataframe1=pd.read_csv(file1, sep='|')

        dataframe2=pd.read_csv(file2, sep='|')

        jsondf1 = dataframe1.to_json(orient='records', indent=0)

        jsondf2 = dataframe2.to_json(orient='records', indent=0)

        mergedjsondf=pd.concat([jsondf1, jsondf2], ignore_index=True)

        with open(outfilename, 'w', encoding='utf-8') as f:

            json.dump(data, f, indent=0, ensure_ascii=False)

        return 1

    except Exception as e:

        return 0

}

 

}

Set mergeStatus=##class(Util).zPymergefiles(inputfile1,inputfile2, "outfile1.json")

1 Comment
Discussão (1)3
Entre ou crie uma conta para continuar
Anúncio
· Jul. 1

Go Deeper with a Live Course

Hi Community,

Looking for a more personal approach to learning InterSystems products?

Try one of our live classroom courses! In just a few days, our experienced instructors will help you get up to speed, no matter your role.

Take a live course: view the schedule  

Upcoming courses:

Discussão (0)1
Entre ou crie uma conta para continuar
Resumo
· Jul. 1

Résumé de la communauté des développeurs d'InterSystems, Juin 2025

Bonjour, voici la newsletter de la communauté des développeurs de Juin 2025.
Statistiques générales
✓ Nouvelles publications 24 publiées le Juin :
 10 nouveaux articles
 13 nouvelles annonces
 1 nouvelle question
✓ Nouveaux membres 6 ayant rejoint le Juin
✓ Publications 1,199 publiées depuis le début
✓ Membres 178 ayant rejoint depuis le début
Meilleures publications
Un coup de poids
Par Andre Larsen Barbosa
Les meilleurs auteurs du mois
Articles
#InterSystems IRIS
#HealthShare
#InterSystems IRIS for Health
#Summit
Annonces
#InterSystems IRIS
#Communauté des développeurs officielle
#InterSystems officiel
#Autre
InterSystems sur HIMSS25 Europe
Par Irène Mykhailova
#Supply Chain Orchestrator
#IRIS contest
#HealthShare
Questions
#InterSystems IRIS
Juin, 2025Month at a GlanceInterSystems Developer Community
Discussão (0)1
Entre ou crie uma conta para continuar
Pergunta
· Jul. 1

Is it possible to audit code changes by user?

Is it possible to audit code changes in a namespace?

Ideally what we'd like to be able to do is check which classes were compiled (or deleted) in a time period, eg in last 3 months, and which user made those changes. Even better would be an audit of what those changes were, but that's less important (for us, as we can probably find that information in other ways).

We have a service where 3 groups, each with multiple users, potentially have access to make changes to the live service. With the best will in the world, each group doesn't always tell every other group about changes made... and it'd make managing things much easier if we had a log of who made what changes that doesn't need manually maintained.

Audit Log seems like a good place to start, but its not obvious to us how to get it to do what we want...

6 Comments
Discussão (6)5
Entre ou crie uma conta para continuar