Questions tagged [csv]

Questions on how to import into, extract data from, or exchange data between databases in CSV format (plain text using commas to separate values).

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Import folder with Multiple CSV's into SSMS w/ out SSIS

I am wondering what's the best and most effective way to import csv's stored in a local folder into DB w/ in SSMS. Folder path- C:\Users\ngutierrez\Desktop\Open_Air_Tables Folder contains about 30 ...
0
votes
0answers
23 views

CSV -> Python -> Pandas.DF -> PostgreSQL (UPSERT, THEN Cull data) [closed]

Problem Statement: I have multiple machines all running the same software, they output CSV files. I need to load this information into a database. The challenge is the user can, with permission, ...
0
votes
0answers
7 views

Allow only import table in phpmyadmin

We build a wordpress site as a database interface in localhost (only). We are using a plugin WpDataTables to display tables, statistics etc. Is it possible to expose somehow only the import option of ...
1
vote
0answers
21 views

verification error on importing csv file into ssms [closed]

I have a .csv file containing slightly more than a million records, and I want to import that file into SSMS 2017 but I get an error while verifying the datas as you can see in the following snapshot: ...
1
vote
1answer
43 views

exporting a sql view to a csv file

Whilst I can just about script to pull data via queries, I'm finding it very difficult to figure out how to export the results of a query to a .csv file and save in a network storage location (novice ...
0
votes
0answers
42 views

Errors with trying to run a stored procedure with local file output

I'm trying to run a stored procedure that I'm passing some variables to. The output is being writted to a CSV file on a local file share. The CSV file gets created, but I'm hitting some errors ...
-1
votes
3answers
28 views

Sub-select from comma separated list in WHERE clause

I have tables like so: TableA id id_link_list 1 1,2 TableB id info 1 blah 2 blah-more I'm struggling to include the TableA.id_link_list column (which is already a comma ...
-1
votes
2answers
55 views

Importing CSV file into a PostgreSQL table

I am using Python with pandas to import a CSV file into a table in Postgres import pandas as pd import psycopg2 from sqlalchemy import create_engine df = pd.read_csv('products.csv', sep=';', ...
0
votes
3answers
84 views

Extracting data from extremely large csv files [closed]

I have a 40gb csv file with over 60 million rows for data analysis. Each row has a unique identifier (some numbers). For example, the first row's unique identifier will repeat approximately 150,000 ...
0
votes
0answers
12 views

RDDs, Maps and Apache Spark

I have been playing around with Apache Spark, firstly I learned PostgreSQL and I have a few queries that I needed to run on Spark. I managed to run them as SQL Strings in Spark SQL, but now I have to ...
0
votes
1answer
25 views

Best practices for storing multiple SQL tables per user (built from uploaded csv file?)

I have a few users who will be uploading a few types of predefined CSV files. I need to store these as sql tables to be able to run queries on this data for a particular user, however that means there'...
1
vote
0answers
12 views

Custom Export from power BI service

I'm trying to make a custom button that exports filtered tables to a csv and downloads them to my computer. I am aware that you can do this with the '...' button but this functionality is for other ...
0
votes
0answers
27 views

Can I force a LOAD DATA LOCAL statement to abort if an error is not loaded?

I am trying to load a CSV file into a MySQL table with the load data local statement. After loading it, the statement reports Query OK, 1030 rows affected, 7314 warnings (0.03 sec) Records: 1043 ...
0
votes
0answers
54 views

Writing CSV directly to a BYTEA column from PostgreSQL tables

Assuming these two tables: CREATE TABLE data (day DATE, kpi INTEGER); CREATE TABLE reports (csv BYTEA); Is it possible to (pseudocode): INSERT INTO reports (csv) (SELECT to_csv(SELECT day, kpi FROM ...
1
vote
1answer
32 views

InfluxDB batch insert only inserts the last line

I'm trying to insert some lines into a InfluxDB instance (running on Windows 7 x64) from both a .txt and a .csv file, but it's only inserting the last line on the file. I'm currently using the ...
0
votes
1answer
20 views

Load flat file into a predetermined table

Scenario Table created Data in flat file loaded to the table but with errors. please advise how to fix it (a) 'address' is split to 3 columns causing mismatch between the source and destination (b)...
-1
votes
1answer
149 views

How to normalize CSV invoice data?

For flat data which comes in with fields like: name address status class version user mode CSV files are regularly received, with the above as typical columns. ...
1
vote
2answers
221 views

MongoDB CSV Export: One Array/Column & Array Index on rows, or vice versa

I have a MongoDB schema that looks like this: const batchSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, time: {type: [Number]}, tmp: {type: [Number]}, hum: {type: [Number]}, ...
0
votes
1answer
30 views

csv engine and mysql start

my question is about speed when perform service mysql start. with many tables (some not often used). what engines consumes more or less start time ? example: innodb --> the more tables, the more ...
1
vote
1answer
56 views

\COPY not returning count psql

I am trying to copy CSV data into tables. Also I want to print the count. The command I'm using is: echo "begin; delete from a; \copy a from a.csv CSV HEADER; end;" | psql -hlocalhost -dpostgres -...
2
votes
2answers
336 views

Can't import flat file into SqlServer

I've got this tab-delimited flat file with fifty columns and two million rows. I am trying to import it into Sql Server 2017 Express. (I first tried working with it in Excel... hopeless.) I see two ...
0
votes
0answers
103 views

MySQL automatic import of (huge) csv files fails using mysqlimport

For testing purposes, I have to insert large Time Series data on a MySQL database, running on a Windows remote server. Firstly, the (very basic) table: CREATE TABLE 'sensor_data' ( '...
0
votes
0answers
28 views

mysql: make the server fail instead of just giving warnings

I have a mysql 5.7 server. I am trying to import some .csv files. Sometimes it may so happen that these are malformed. Here is a sample case: - 'mysql: [Warning] Using a password on the command ...
1
vote
2answers
785 views

postges: psql csv import fails although file exists

Trying to import a csv file as follows: psql -h 127.0.0.1 -d jira_statistics -U admin -p 5432 -c "COPY bugs FROM '/home/centos/bugs.csv' delimiter '|' csv;" Password for user admin: ERROR: could ...
0
votes
1answer
102 views

csv import fails without throwing an error

Ι am trying to import a csv file into an existing mysql 5.7 table. Here is the command (the db is in docker with bind mount for persistence) mysql -h 127.0.0.1 -uroot -prootpass --local_infile=1 ...
0
votes
2answers
2k views

foreach loop in sql scripts?

In powershell I use foreach to run a function through a list of targets. I was wondering that if there is any thing similar to foreach in sql, so I can run the same query through multiple DBs I chose ...
2
votes
0answers
42 views

How To Query Databases in Subject-Predicate Format?

I have csv data in this format: id fieldname fieldvalue -- --------- ---------- 1 fieldA A1 1 fieldB B1 2 fieldA A2 2 fieldA B2 If I upload this to MySQL, how can I ...
0
votes
3answers
459 views

Leading zeros are truncated when I spool to CSV

I have spooled a file to CSV using sqlplus. Everything works great but there is one issue. I have mobile numbers which start with 0, for example 04589 and 02586. After the spooling is complete, 0s ...
0
votes
1answer
82 views

listagg in order and including a sequence of separator when missing any row of a sequence

Sorry for the long title but it's a little bit difficult to explain. We have a table | N rows | Atrib1 | Atrib2 | Atrib3 | Atrib4 | Final row | --------------------------------------------------...
0
votes
2answers
264 views

SQL Server Agent - Do not show job step details and column headers in output file

I have a SQL Server Agent job which runs a select statement on a schedule and appends results to a CSV file (Right click the job --> properties --> advanced and then adding a file path to the output ...
1
vote
1answer
2k views

How to automate CSV-exports of queries in PL/SQL Developer (Oracle)?

I'm no pro in Oracle or PL/SQL Developer (I mostly use and admin mySQL and MS SQL Server). I'm not an admin of any sort, but have read access to many tables in Oracle via PL/SQL Developer. I need ...
5
votes
2answers
788 views

How to import CSV file in SQL server 2008?

I am trying to import a CSV file in SQL Server 2008. BULK INSERT is a way to go but it is applicable for CSV from SQL Server 2014 onwards. What would be an alternative way to achieve this goal? Any ...
-1
votes
1answer
273 views

Copy in SQL with index vs without index

Recently I have received a data dump in csv format that I am trying to import in my PSQL database. The dump consists of 8 csv file each of size 7GB. I have found that using the Copy command on one ...
2
votes
1answer
130 views

Handling variable fields in a CSV file with JSON?

Im trying to figure out the engineering to get a CSV file into PostgreSQL. Requirements: The CSV has X number of predetermined required fields The CSV file has Y number of dynamic fields Example: ...
0
votes
4answers
222 views

SSIS deployment failed - working with files

I've developed a simple SSIS package that will open a csv file, select a number of column, add two derived columns and then copy the results to a file. This works within visual studio (even if it ...
0
votes
1answer
1k views

Upload multiple csv file to multiple tables sqlServer

I have over than 200 csv files that each of them is diffrent table. I create now a new DB and want to upload them all so I will have all the table. I not accessable to old DB to backup in diffrent ...
-3
votes
1answer
324 views

Bulk Insert csv file error [closed]

I am trying to BULK INSERT a csv file to my SQL Server. Using code I found on this SO question, I ran: BULK INSERT Temp FROM 'c:\csv\student.csv ' WITH ( FIELDTERMINATOR = ',', ...
1
vote
1answer
315 views

How to upload multiple csv files to sql server without constrains

I backed up an old SQL Server DB with .CSV files for each table. The old DB is now gone; the .CSV files are all I have. Now I want to create new DB and upload all those csv file (my old db removed) . ...
2
votes
1answer
79 views

How do I bulk load data and still provide row-by-row feedback?

We want to allow our users to import CSVs containing many thousands of records to "pre-load" a particular table in our system. It's not strictly a one-time operation, it may be performed multiple ...
2
votes
1answer
317 views

postgresql - Importing CSV Data with Custom Type

I'm mostly a newcomer to databases and am building a postgres database of student achievement in a series of courses. My database uses a type called "class" that consists of the course, the academic ...
2
votes
2answers
969 views

How to dump to csv valid json with Postgresql?

I am trying to dump some data as json with: \copy (SELECT json_build_object('areaSqft',area_sqft, 'titleNos',title_nos, 'buildingIds',building_ids, 'geometry',geom_json) FROM my_data) to my_data.csv ...
1
vote
2answers
135 views

How to split a string on every 2nd delimiter?

I have curves consisting of X/Y points (an array?) stored in a string with the same delimiter. There is 1 curve per row. Below is a simple example: 0,0,1,1,2,1.9,2.9,2.8,3.6,3.5 I want to extract ...
0
votes
1answer
388 views

Set columns dinamically in UTL_FILE

I've been stuck with this problem, so I'm looking for help now. I'm trying to get a .cvs file from a query with PL/SQL. I'm using a cursor and UTL_FILE to achieve that. The problem is that I have to ...
0
votes
1answer
345 views

Finding Columns causing errors in SQL Developer

I'm relatively new to Oracle SQL and trying to import CSVs using SQL Developer. I've been getting errors such as Insert failed for rows 1351 through 1400 ORA-01438: value larger than ...
0
votes
2answers
425 views

How to connect from local computer (mac) to remote Oracle DB and execute script and save results to CSV?

I can connect to remote Oracle DB using this signature: sqlplus 'user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=hostname.network)(Port=1521))(CONNECT_DATA=(SID=remote_SID)))' Now want to ...
-1
votes
1answer
385 views

Export only certain column on single table to csv format

I need to export certain column only of a database table to csv file. Here is the format of the source: ID | user_email | user_login | user_nickname | usergroup | address | user_registered | ...
1
vote
1answer
451 views

Oracle XMLAGG issue with combining cells that have comma separated values in cells

Have a situation where I'm trying to use xmlagg to get: | ID | name row1 | 1 | apple row2 | 1 | apple,pear,banana row3 | 1 | apple,banana row4 | 1 | pear,banana,orange row5 | 2 | orange ...
0
votes
2answers
4k views

how to import a huge csv file into Cassandra?

I am trying to import a csv file into Cassandra which is very long. These are food products: ingredients, nutrition, labels... It comes from Open Food Data. List information on food products: ...
1
vote
1answer
29 views

How to relate LatLong and State columns on PowerBI

I have two separate tables, one with latitude and longitude columns (for locations in the USA), and the other with the US state abbreviation (TX, AZ, CA, etc). Is there a way to count the number of ...
2
votes
1answer
136 views

PostgreSQL: simple equality query returning no results for indexed columns

I have a very large table (around 140M rows) with five columns: CREATE TABLE IF NOT EXISTS citations ( citing_id text, citing_issn text, cited_id text, cited_issn text, year int ); ...