Using Apache Drill - apache-drill

I am trying to use Apache Drill. The instructions at https://drill.apache.org/docs/drill-in-10-minutes/ seem to be very straightforward but after following them I get the following error:
show files;
Error: VALIDATION ERROR: SHOW FILES is supported in workspace type schema only. Schema [] is not a workspace schema.

Missing config for the path to files maybe?

Looks like you are issuing this command without connecting to any schema. You can issue this command after switching to particular schema using 'use '.Issue 'show schemas' to list available schemas.
If you are using sqlline, You may specify schema while connecting to sqlline as below (to connect schema 'dfs') .
sqlline -u "jdbc:drill:schema=dfs;zk=<zk node>:<zk port>"

Related

Azcopy 7.3.0 to copy tables from table storage using GitHub Actions

I'm trying to copy tables from "table storage" using GitHub Actions , but with version 7.3.0 of azcopy shows the following error message :
[2022/09/27 17:13:45.525+00:00][VERBOSE] 7.3.0 : azcopy --source
https://sourcestorage.table.core.windows.net/TestTable1 --destination
/home/runner/tableexport/ --source-key ****** --verbose
Error: 9/27 17:13:45][ERROR] The syntax of the command is incorrect.
The source azure storage location type can not be inferred. Use
--source-type <blob|file> to specify the location type explicitly.
The source type is not blob or file , and I think that using domain table.core.windows.net the command should detect that the source is table storage. Can you help me with this problem?. Thanks in advance.
Best Regards

DatabaseLibrary in RobotFramework

I'm using this libary...
https://franz-see.github.io/Robotframework-Database-Library/api/1.2.2/DatabaseLibrary.html
then in the .robot file I have this set-up:
TC check database
# DatabaseLibrary.Connect To Database dbapiModuleName=None dbName=SpecimenDatabase dbUsername=testenvans_admin dbPassword=wwSpecimen01 dbHost=specimen.domeinwinkel.nl dbPort=443 dbCharset=None dbConfigFile=db.cfg
Connect To Database Using Custom Params dbapiModuleName=None, db_connect_string=='SpecimenDatabase', user='Specimen_user', password='SpecimenPassword', host='s99.specimenhost.com', port=5432
but no matter what I do it keeps saying: no Module named None
what IS dbapiModuleName actually?
Connect to your MySQL database from a remote connection. My answer is: https://help.directadmin.com/item.php?id=308

In moqui, configuration to use mysql and loading with seed data

In moqui, I am trying to configure to use mysql, commented out derby and uncommented mysql in defaultconf, I copied the connector to framework lib, included the dependency in framework build.gradle, on running load, I get this error - java.lang.reflect.InvocationTargetExceptionjavax.management.InstanceAlreadyExistsException: bitronix.tm:type=JDBC,UniqueName=DEFAULT_transactional_DS,Id=0 -- thanks for any help
Can you post a snippet of code you have modified in MoquiDefaultConf.xml and build.graddle file.
A viable alternative to configure MySQL with Moqui is by doing related setting in configuration files (i.e. MoquiDevConf.xml for development instance, MoquiStagingConf.xml for staging instance and MoquiProductionConf.xml for production instance.). Follow the steps below to configure MySQL with Moqui.
Since, May be you are trying to do some development, you need to make changes in MoquiDevConf.xml file only.
Replace the <entity-facade> code in MoquiDevConf.xml with the following code.
<entity-facade crypt-pass="MoquiDefaultPassword:CHANGEME">
<datasource group-name="transactional" database-conf-name="mysql" schema-name="">
<inline-jdbc jdbc-uri="jdbc:mysql://127.0.0.1:3306/MoquiTransactional?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"
jdbc-username="MYSQL_USER_NAME" jdbc-password="MYSQL_PASSWORD" pool-minsize="2" pool-maxsize="50"/>
</datasource>
</entity-facade>
In the code above 'MoquiDEFAULT' is the name of database. Replace the MYSQL_USER_NAME and MYSQL_PASSWORD with your MySQL username and password.
Create a database in MySQL (as per the code above, create the database with name MoquiTransactional).
Add the jdbc driver for MySQL in the runtime/lib directory.
In MoquiInit.properties file, set MoquiDevConf.xml file path to "moqui.conf" property i.e. moqui.conf=conf/MoquiDevConf.xml
Now just simply build, load and run.
To answer your question for loading seed data,
you can simply the run the gradle command gradle load -Ptypes=seed, this only loads the seed type data.
Without more details my best guess is that you have another instance of Bitronix running on the machine, by the UniqueName almost certainly another instance of Moqui running. Make sure no other instance is running, killing background processes if there are any, before starting your new instance.

SOURCE error 2?

When i try to source an sql file i get the error:
mysql> source C:/Users/tom/Documents/insert.sql
ERROR:
Failed to open file 'C:/Users/tom/Documents/insert.sql', error: 2
I have checked the file path, which looks fine to me. I have also tried \. C:/Users/etc
I am trying to source the sql file which holds insert statements for particular tables. All the statements in the file work when entered manually. What else could i be doing wrong?
Have tried using both backslash and forward slash when using this command
Probably a problem of access right on the file (the file is being accessed by the mysqld server process, not yourself). Try placing the file into the data folder of MySQL, then import it from this location. The location of data folder depends on your distribution and on your own configuration.
Alternatively, feed the SQL script directly to your mysql client's stdin:
mysql [all relevant options] your_database < C:\path\to\your\script.sql
I am using Ubuntu 14.04 version.
I too faced below error 2.
mysql> SOURCE home/loc/Downloads/AllTables.sql;
Failed to open file 'home/loc/Downloads/AllTables.sql', error: 2
Solution :
mysql> SOURCE /home/loc/Downloads/AllTables.sql;
Just added a '/' in front of home
Hope this helps some one.
Have you checked if the file exits? I have had this problem before.
This:
this:
and this works:

Unable to run Play Framework 1.2.4 application using ClearDB on heroku

here is the ClearDB url given by heroku, which I have placed in my application.conf:
mysql://ce321a40b79906:ad8a252e#us-cdbr-east.cleardb.com/heroku_171088b609e621d?reconnect=true
This doesn't work ! The log show following exception:
←[36m2012-05-03T15:45:52+00:00 app[web.1]:←[0m Caused by: com.mysql.jdbc.excepti
ons.jdbc4.MySQLSyntaxErrorException: Table 'heroku_171088b609e621d.user' doesn't exist
Where as when I use Postgres using following configuration, it works perfectly fine:
db=postgres://xfqolvejdz:nRofWB6Lg1V9JDadmjfW#ec2-50-19-226-184.compute-1.amazonaws.com/xfqolvejdz
jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
jpa.ddl=update
What am I missing here ?
The best way is to use the environment variables instead of copy and pasting URLs. For Postgres the lines in the conf/application.conf are:
%prod.db=${DATABASE_URL}
%prod.jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
%prod.jpa.ddl=update
For ClearDB the following should work:
%prod.db=${CLEARDB_DATABASE_URL}
%prod.jpa.dialect=org.hibernate.dialect.MySQLDialect
%prod.jpa.ddl=update