How to Export/Import a Data Source from DataGrip? - datasource

I can't seem to figure out how to export a data source configuration in DataGrip (currently on 2016.2 EAP).
I would like to export a handful of data sources and share them with my teammates to make it easier for them to get up and running on DG.
I've tried File->Export Settings (exporting all settings) and did not notice the data source configurations within the resulting jar file.
I seem to recall that in earlier versions of the tool (when it was still called 0xDBE), you could find data source configuration files on the drive and share them that way, but I am unable to locate any at this time.
Perhaps it's not possible?

UPDATE FROM 2021!
Starting from version 2021.1, you can just press Ctrl/Cmd+C on the data source, and then Ctrl/Cmd+V it in another IDE. The clipboard contains XML for the data source, so you can send it to the colleague via e-mail, messenger etc.
It is possible!
You need to share a project with your friend — all you do in DataGrip is in the context of a project. If you did not create a new one, everything is under the default project. Look at the gif:
The more detailed information can be found in the tutorial: https://blog.jetbrains.com/datagrip/2018/05/21/copy-and-share-data-sources-in-datagrip/

You can do it easily via the clipboard, although it took me a while to figure it out:
in your source project, open the Database tool window, select the data sources you want to export, then right click / "Database Tools..." / "Copy Settings"
in your target project, open Database tool window, click on "+" then "Import from Clipboard"
Also works between DataGrip and IntelliJ.
Addendum
The wording has changed slightly in DataGrip 2018.2 EAP (or before), instead of "Copy Settings" it's now "Copy Data Source(s) to Clipboard", which reflects better what it does.

DataGrip stores data sources on two different levels:
Project level: together with project configuration files inside .idea subfolder of the project folder
IDE level: stored in IDE config/options directory.
Project level data source is available once you open the project.
To import/export IDE level Data Source use File | Import/Export settings action.
To move Data Source to IDE settings and back use corresponding action in Datasource Properties dialog (see screenshot) as shown here:

On my current version 2020.1 the projects are on:
/System/Volumes/Data/Users/<USER_NAME>/Library/Application Support/JetBrains/DataGrip2020.1/projects/default/
A good way to find where is it store is just calling:
find . -name "dataSources.xml"
It will find for that file everywhere.

make the data source global and use export settings to export.
https://www.jetbrains.com/help/datagrip/managing-data-sources.html#sharing-data-source-settings

You can find all data sources at this path (change username and version):
C:\Users\fouad.DataGrip2019.1\config\projects\default\.idea

I recently discovered a really cool Mongodb plugin for IntelliJ and DataGrip called 'Mongo Expert' that helps users navigate the Mongodb database and work more efficiently. With support for Commandline MongDB Database Tools like mongoexpert, mongoimport, mongodump, and mongorestore, users can create and execute commands through easy-to-understand dialogues. You can download 'Mongo Expert' from the JetBrains Plugin Repository. I hope it will be useful for you too!
https://plugins.jetbrains.com/plugin/20761-mongo-expert

Related

How can we copy the list of issues from one project to another in JIRA?

We have one project in JIRA and we have uploaded all the issues under it. The issues are stored in the category wise structure.
For Example: Module 1 >> Test Cases
We want to fetch(copy) the test cases of few categories into another project. Is there any mechanism available in JIRA to copy multiple test cases in one go?
Kindly suggest the best possible solution of the above requirement.
There are a few options which may work for you:
You could try use the Structure Plugin for Jira:
Cloning Multiple Issues
Try a Marketplace plugin Bulk Clone Basic for Jira
Bulk Clone Basic Plugin
Another Try/Buy option Clone Plus Plugin for Jira
bobswift.atlassian.net/wiki/display/JCPP
Alternatively you could export the issues you need, adjust and then import as a new project:
confluence.atlassian.com/cloud/import-and-export-data-873871368.html
This functionality is still not supported in JIRA. The workaround mentioned in Tom's answer uses the Export/Import functionality, but, apparently, this does not copy any attachments (at least, not with JiraServer), so it is an unsatisfactory solution.
Unfortunately, AddOns appear to be the only option. Here's a list that shows the currently supported cloning tools in the Atlassian Marketplace. (At this writing, it looks like there are 3 or 4 options that promise to do the trick -- all "Try/Buy". I have not tested them.)
For those who aren't concerned about attachments, here's the detailed steps for exporting and importing to copy issues from one Jira project to another (in 2022 anyway).
In the source project, navigate to the Issues tab
Click the Export Issues button
Click Export Excel CSV (all fields)
Save the file in the dialog that appears
(Optional) Edit the CSV if you like although you can change some things in the import process
Click the ... in the top right
Select Import issues from CSV
Click Choose File
Select the CSV exported earlier
Click Next
Set "Import to Project" to your destination project
Click Next
Set fields you wish to map (e.g. Assignee, Components, Description)
Click Next
Click Begin Import
I found the solution for this
Search all the issue based on the filter.
Select all issue and top 3 dot select clone issue.
Follow the instruction and it moves all the issues.

Lightswitch lost data provider for data source connection

I have an odd situation on a VS upgrade from 2013 > 2015 outside of runtime.
App Type: MS Lightswitch HTML Client
DB Type: Oracle
Framework: 4.5
Story: I upgraded VS and replaced OPD.Net to the 2015 version. Works fine.
Then I converted my application. There were a lot of things to fix, but most were pretty easily remedied. I tested the application and it works as expected so I published to test server and everything checks out. Success! So I thought.
I want to continue developing the site. As I make db changes, they need to be reconciled to the intrinsic db in my project.
After clicking 'Update Database' I see this. So far so good.
What's expected is that after I hit 'Finish', all changes to the selected table should pull in to the lsml files. But this is what I get.
I've read a few places like The given key was not present in the dictionary, what key? [closed] but these all look like runtime remediations.
If I go back to the update screen and hit 'Previous', I get this.
I sifted through every freakin lsml file in text editor looking for where the provider is assigned. No luck. I also created a new proj to compare, nothing stood out. I also tried adding another data source which works fine. So ODP.net is not the issue. I am lost on what to do now. I searched all over the site, Google, for every error message with various tags. At this point I reach out to you, or anyone that may know what this is about.
Thanks ahead of time!
Note for future users upgrading a VS LS project with Oracle db.
Since a new version ODP.Net is required (in my case 2015), the provider name is going to change. To ensure LS knows the new provider, the data source lsml file needs to be updated. In my case I used GIT to help out. This is how I resolved it.
Steps:
After converting your project and replacing ODP.net to the current version.
Create a new data source using the new provider.
Save the project and re-open. This will cause lightswitch to recompile.
Open File Explorer and navigatye to the ProjectName.server folder. In a text editor (I used notepad) open the lsml files under ProjectName.server and there should be two lsml files (1 for the pre-existing and another for the new) or more if you have multiple sources.
Copy the connection properties of the new datasource to a new temp file on your desktop.
Roll back the entire solution using GIT or other source control.
Use text editor to open the lsml file for the original data source.
Update the GUID for DataProviderName with the values from the temp file in step 4.
Note: The connection string GUID should be left alone as it should match your GUID in the web.config file.
<DataService.ConnectionProperties>
<ConnectionProperty
Name="DataProviderName"
Value="9d8fdbb9-xxxx-4787-xxxx-49831d34ad4b" />
<ConnectionProperty
Name="ProviderInvariantName"
Value="Oracle.ManagedDataAccess.Client" />
<ConnectionProperty
Name="ConnectionStringGuid"
Value="36e67aca-xxxx-41a7-xxxx-a4546761b30d" />
<ConnectionProperty
Name="ProviderManifestToken"
Value="12.1" />
</DataService.ConnectionProperties>
Finally reload project and the changes should take effect allowing you to once again update your data source.
Thanks

IntelliJ IDEA 14: Local history storage format

I have IntelliJ IDEA 14 installed. Now I would like to read the local file history located under $HOME/.IntelliJIdea14/system/LocalHistory with an external program. The folder has two files: changes.storageData and changes.storageRecordIndex.
How can I open and read them to extract my file history? I already tried unzip, tar -xvzf and an SqLite browser.
Edit: As IntelliJ is open source, I tried taking a quick look at their source code and by searching for ".storageData", I found the Abstract Storage class.
Looking further there is a LocalHistoryStorage which uses a LocalHistoryStorageTable and a PagePool.
From a quick glance it seems these storage thingies have a sort of headers in the files.
I hope that gave a good quick start.
I would say that there is no way to read that data. It is in some proprietary format.
There is a Jetbrains Feature Request that it should be possible to export the data.

Trying to perform a diff using netbeans and its Git repository

I have two different version of a website, an older version, and a newer version that is supposed to have some sort of virus on it (or malicious code of some kind). I need to perform a diff between the two sites and try to eliminate the virus in the newer one.
After some searching I found netbeans 7.1 is able to do this using it's Git Repository. I was following this tutorial http://netbeans.org/kb/docs/ide/git.html but I am not getting the same options on my screen as in the tutorial. I am using netbeans 7.1 RC1 and downloaded the jdk from the link on that same page. The jdk download itself says jdk7 but the folder it creates on my computer is named jdk1.7.0_01 . I'm assuming jdk7 is short for jdk1.7 .
I get as far as the very end of the "Initializing a Git Repository" step. The end when it says "All the project files are marked Added in your Working Tree. To view a file status, place the cursor over the file name in the Projects window. The status of the file in the Working Tree displays in green to the right of the slash like shown in the following picture." does not happen.
I tried going further anyway, but there is just more and more options that do not show up for me.
I am also open to another way to perform a diff operation between the sites, it doesn't have to be with using netbeans. I should note however I do not have access to a unix box. So the solution has to work for windows, or I guess I can go on a coworkers mac if I need to.
Thank you.
From your question, it sounds like you did not already have your web site code under version control. If that's the case then I'd suggest doing so, and git is a very good choice. It is what I use.
Your goal, however, is to diff the older version of your site with the "newer" (possibly infected) version, and that can be done without having to deal with a version control system. There are several good diff tools for Windows. I mainly use WinMerge, as I like its user interface and simplicity. KDiff3 is another good one, and I use that one in conjunction with git merge operations, because it supports a three-way-merge comparison (which WinMerge does not).
If you were to use WinMerge for your diff, and you had the code from the old version in Q:\example.com\old-version and the "new" version in Q:\example.com\current-version, then you would start WinMerge, and either choose File|Open... from the menu, or click on the open icon in the toolbar. You would get a dialog like the following, and would fill it in as shown:
If you filled everything in correctly, then you would be able to click on the OK button, and would get a list of file differences. Depending on the default settings, you might also see files that have not changed at all in that list. You can hide those using the View menu. Double-clicking on a file with differences will open the two versions and show you the differences.
Explore the WinMerge options. I have mine set, for example, to compare white-space differences, but to ignore different line endings (Unix's LF versus Windows' CR/LF).

How to resolve an Error after importing a package in Enterprse Architect Sparx Systems

Everytime I want to change some properties in some class I get the following error messages:
:Microsoft Cursor Engine [-2147217864]
Row cannot be located for updating. Some values may have been changed since it was last read.
ADODB.Recordset[-2146825069]
Operation is not allowed in this context.
How can I solve them??
Even if this question was posted a long time ago:
Now and then this error occurs in my projects, too.
Every time I try to edit specific elements in Enterprise Architect projects i get exactly the same error messages. The only solution to this is to delete the element completely and create it again.
#TomO:
When you are importing a package, is this from XMI or are you import a source code directory?
I import only via XMI file.
What are you using as a repository?
I'm using a PostgreSQL-Server based repository, which I access via ODBC Driver.
In your ODBC Data Source Configuration do you have "Return matched rows instead of affected rows" and "Allow big result sets".
Could specify where I can find these options? Perhaps this is outdated, becaus I can't find any of these options under the Options/Datasource Menu in my ODBC driver.
If you are importing form XMI are you stripping the GUIDs on import, this is always a good idea if you are making a copy of an existing folder in your model as having two elements with the same GUID is not ideal ;-)
I strip GUIDs when I'm exporting and again when I'm importing XMI files.
I would really apprechiate any help concerning this topic.
If possible i might need a little more information. When you are importing a package, is this from XMI or are you import a source code directory? What are you using as a repository? Given the error I am assuming it is not the local EAP file.
In your ODBC Data Source Configuration do you have "Return matched rows instead of affected rows" and "Allow big result sets"
If you are importing form XMI are you stripping the GUIDs on import, this is always a good idea if you are making a copy of an existing folder in your model as having two elements with the same GUID is not ideal ;-)
I have also noticed that you asked this on Apr 14th - sorry it has taken me so long to find your request. I hope this helps!
Are you accessing your ea repository as a cloud repository please? If so, you could try to switch to access the repository as an odbc datasource, and this problem might be solved. I think it is a bug of the Sparx enterprise architect cloud service.