how do I use my local drive folder as data source in datagrip? - sql

Using Datagrip,
I wanna write sql code and take some aggregated data from my csv file saved in my local drive.
How do I point my folder as datasource in datagrip and import csv to there to run sql code?
I have csv files in my local drive but don't know how to set my folder as data source and import my csv files as tables to be used.

You can right click on the schema and click on import data from file like below. You will see a window pop up where you specify separators, headers, etc along with a preview.

Related

Excel on Mac. Cannot open IQY file in Data/Get External Data/Run Web Query

I am running Excel version 16.45 on Mac.
I have created a .iqy and saved it in the Queries directory alongside certain templates which were already there.
I go to Data/Get External Data/Run Web Queries. While the templates are accessible, my file is visible but greyed out (same thing happens if I save the file in a different directory).
Would anyone be able to help?
According to your information, I would like to confirm whether the issue occurs when you follow the steps as below:
1.Create a Word file, paste the web URL.
2.Save the Word as .iqy with .txt format.
3.Choose MS-DOS as coding.
4.Create an Excel file and click "Data >Get External Data >Run Web Query (Or Run Saved Query) " of the Bar
I was able to address the issue as follows.
When navigating to the relevant directory with Finder, the '.iqy' file appears to be appropriately named (as per Image 1).
In fact, if you reach the file in Terminal, the file is saved as '.iqy.txt'.
So all I had to do is rename the file, simply removing the '.txt' string at the end.
Screen you see when navigating in Finder

Open plaintext files like python files

If you tinker a lot with Google Colab maybe you want to edit some .txt files or view a .csv file or any other kind of .csv files, you can already open python files.
If you go to the file directory listing and click
Just click on the file you want to open, and you open a new tab
However if this file is not a python file, you simply download it, is there a way to view the file in browser?
I made a library to show files easily in Colab.
!pip install kora
For any text file, you can use bat which provide syntax highlight. See documentation
import kora.install.bat
!bat sample_data/README.md
For a csv, you can use google.colab.data_table, which I simplify calling it a bit.
import pandas as pd
import kora.data_table
pd.read_csv('sample_data/california_housing_test.csv')
For a json file, it can make a collapsible display
from kora.json import render
render('sample_data/anscombe.json')
See all 3 examples in this notebook.

Export Excel file in Orangehrm

I have using open source of orangehrm ver 3.2.2 on my Server. I want add function export data (list leave, list emp, report..) to Excel file. But I don't how to do it.
For export data in excel file, you need following steps :
Put a button for generate excel file. On click button send ajax request which
is get data as per requirements.
after get data on server side use phpexcel library for generate excele file.
for generate excel file follow this example : http://www.blrf.net/blog/46/code/php/writing-excel-files-with-phpexcel/
save file in folder.
in responce, you need to send file path for download.
And on successfully received data, download file from responce.

sql Developer pkg AND trg FILES

taking a SQL class and using sql developer. How do I create a file with extensions .pkg and .trg. I know they are for package and triggers. When I opened my connection and right clicked package I opened a package but it did not create an actual file that I would be able to submit?
Any ideas?
There are various options for saving your code to a file:
Right click on the object in the connections tree and choose Quick DDL -> Save to File. This will save the file with a .sql extension which you can later change as desired from the file system.
Open the object from the connections tree, then choose File -> Save As. This method defaults to saving files with a .pls extension, but you can override that when saving or change it later from the file system.
Drag the objects from the Connections tree to the shopping Cart (View->Cart) then Click the Export Cart button (DB icon with a green arrow) and choose the Save As Separate Files option. The files will be saved with .sql extensions, and for table objects it can optionally export the data as well.

How can you insert VBA or any code into a csv?

I was able to make macros in excel and then run them when opening them. But when I save the file it doesnt save my macros.
How can I make a csv execute code?
Comma Separated Values (CSV) is more or less a standard file format and is only plain text. See https://www.rfc-editor.org/rfc/rfc4180 for more information.
The reason people made different, more complicated file formats is because they wanted to store things (like code or formatting) that plain text doesn't support.
If you want to store code, you have to use a different file format.
When you save the file as .csv, export your VBA into a set of .bas files.
When you open the .csv file, you can also import the saved .bas files into VBA as well.